@oscharko-dev/keiko 0.1.0-beta.0 → 0.1.0-beta.3

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 (60) hide show
  1. package/README.md +98 -570
  2. package/dist/cli/gen-tests.js +8 -3
  3. package/dist/cli/index.js +0 -0
  4. package/dist/cli/init.d.ts +8 -0
  5. package/dist/cli/init.js +122 -0
  6. package/dist/cli/investigate.js +6 -2
  7. package/dist/cli/lifecycle.d.ts +18 -0
  8. package/dist/cli/lifecycle.js +289 -0
  9. package/dist/cli/models.js +2 -2
  10. package/dist/cli/runner.js +21 -28
  11. package/dist/gateway/capabilities.d.ts +1 -0
  12. package/dist/gateway/capabilities.data.js +5 -203
  13. package/dist/gateway/capabilities.js +18 -0
  14. package/dist/gateway/config.d.ts +2 -1
  15. package/dist/gateway/config.js +98 -9
  16. package/dist/gateway/gateway.js +3 -3
  17. package/dist/gateway/index.d.ts +2 -2
  18. package/dist/gateway/index.js +2 -2
  19. package/dist/gateway/model-selection.d.ts +3 -1
  20. package/dist/gateway/model-selection.js +15 -4
  21. package/dist/gateway/types.d.ts +1 -0
  22. package/dist/harness/session.d.ts +1 -1
  23. package/dist/harness/session.js +1 -1
  24. package/dist/sdk/index.d.ts +1 -1
  25. package/dist/sdk/index.js +1 -1
  26. package/dist/tools/patch-normalize.js +1 -2
  27. package/dist/tools/terminal-policy.js +1 -8
  28. package/dist/ui/chat-handlers.js +26 -12
  29. package/dist/ui/csp-hashes.json +6 -6
  30. package/dist/ui/deps.d.ts +14 -0
  31. package/dist/ui/deps.js +92 -20
  32. package/dist/ui/gateway-setup.d.ts +3 -0
  33. package/dist/ui/gateway-setup.js +235 -0
  34. package/dist/ui/read-handlers.js +14 -7
  35. package/dist/ui/routes.js +6 -4
  36. package/dist/ui/run-handlers.js +3 -2
  37. package/dist/ui/server.d.ts +1 -1
  38. package/dist/ui/server.js +1 -1
  39. package/dist/ui/static/404.html +1 -1
  40. package/dist/ui/static/_next/static/chunks/44-17c259c8e72fb82f.js +1 -0
  41. package/dist/ui/static/_next/static/chunks/app/_not-found/{page-75825b09bcecad97.js → page-7bd871301b874ae0.js} +1 -1
  42. package/dist/ui/static/_next/static/chunks/app/launch/{page-9c86a13c29884245.js → page-3bd098d60d6df513.js} +1 -1
  43. package/dist/ui/static/_next/static/chunks/app/layout-091bb8be985f5c03.js +1 -0
  44. package/dist/ui/static/_next/static/chunks/app/{page-4168c12c68b7a853.js → page-2006f21df58c2bb9.js} +1 -1
  45. package/dist/ui/static/_next/static/chunks/{main-app-30679af7240d63e9.js → main-app-e8144a306630b76d.js} +1 -1
  46. package/dist/ui/static/_next/static/css/{be7cb54d5c5673b6.css → 3d68155c8db012f4.css} +1 -1
  47. package/dist/ui/static/index.html +1 -1
  48. package/dist/ui/static/index.txt +3 -3
  49. package/dist/ui/static/launch.html +1 -1
  50. package/dist/ui/static/launch.txt +3 -3
  51. package/dist/ui/store-handlers.js +16 -12
  52. package/dist/workflows/bug-investigation/model-loop.js +1 -4
  53. package/dist/workflows/bug-investigation/parse.js +5 -3
  54. package/dist/workflows/unit-tests/model-loop.js +1 -1
  55. package/dist/workspace/retrieval.js +1 -1
  56. package/package.json +4 -3
  57. package/dist/ui/static/_next/static/chunks/4-be1fef693af8e088.js +0 -1
  58. package/dist/ui/static/_next/static/chunks/app/layout-bdea63fe87947d50.js +0 -1
  59. /package/dist/ui/static/_next/static/{ca-A01hy9W98aRvMZKdAw → f456ZUOjzfLnTnTyaLylj}/_buildManifest.js +0 -0
  60. /package/dist/ui/static/_next/static/{ca-A01hy9W98aRvMZKdAw → f456ZUOjzfLnTnTyaLylj}/_ssgManifest.js +0 -0
@@ -63,7 +63,9 @@ function extractFencedDiffs(content) {
63
63
  }
64
64
  // No recognised diff fence: if the whole content looks like a raw diff, treat it as one;
65
65
  // otherwise it is prose.
66
- return looksLikeDiff(content) ? { diffs: [content.trim()], rest: "" } : { diffs: [""], rest: content };
66
+ return looksLikeDiff(content)
67
+ ? { diffs: [content.trim()], rest: "" }
68
+ : { diffs: [""], rest: content };
67
69
  }
68
70
  // A cheap unfenced-diff heuristic: a unified diff begins with a `diff --git`, `--- `, or `+++ `
69
71
  // marker. Used only for the no-fence fallback. Plain prefix checks; no regex.
@@ -100,13 +102,13 @@ function parseConfidence(rest) {
100
102
  return CONFIDENCE_LEVELS.find((level) => lower.includes(level));
101
103
  }
102
104
  export function parseBugModelOutput(content) {
103
- return parseBugModelOutputCandidates(content)[0] ?? {
105
+ return (parseBugModelOutputCandidates(content)[0] ?? {
104
106
  diff: "",
105
107
  rootCause: undefined,
106
108
  regressionTestStrategy: undefined,
107
109
  uncertainty: undefined,
108
110
  confidence: undefined,
109
- };
111
+ });
110
112
  }
111
113
  export function parseBugModelOutputCandidates(content) {
112
114
  const { diffs, rest } = extractFencedDiffs(content);
@@ -52,7 +52,7 @@ async function attemptOnce(state, workspace, conventions, pack, attempt, rejecti
52
52
  });
53
53
  const effectiveDiff = validation.normalizedDiff ?? parsed.diff;
54
54
  const guardCode = validation.ok
55
- ? emptyPatchRejection(effectiveDiff, validation) ?? productionGuard(workspace, validation)
55
+ ? (emptyPatchRejection(effectiveDiff, validation) ?? productionGuard(workspace, validation))
56
56
  : validation.reasons[0]?.code;
57
57
  emitValidation(state, validation, guardCode);
58
58
  if (validation.ok && guardCode === undefined) {
@@ -1,5 +1,5 @@
1
1
  // Retrieval seam (ADR-0005 D5). `RetrievalStrategy` is the typed extension point a future
2
- // embedding ranker (e.g. `multilingual-e5-large`) plugs into. Wave-1 ships ONLY the seam and
2
+ // embedding ranker (e.g. `example-embedding-model`) plugs into. Wave-1 ships ONLY the seam and
3
3
  // a deterministic lexical default — no embeddings, no vector DB, no new dependency. The
4
4
  // default ranker is pure and clock/RNG-free so context packs are reproducible.
5
5
  import { SELECTION_REASON_PRIORITY } from "./types.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oscharko-dev/keiko",
3
- "version": "0.1.0-beta.0",
3
+ "version": "0.1.0-beta.3",
4
4
  "description": "Enterprise model-agnostic developer-assist coding agent for regulated engineering workflows.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -34,10 +34,11 @@
34
34
  "test": "vitest run",
35
35
  "test:coverage": "vitest run --coverage",
36
36
  "ui:ci": "npm --prefix ui ci --ignore-scripts",
37
+ "prepare:bin": "node scripts/ensure-bin-mode.mjs",
37
38
  "build:ui": "node scripts/build-ui.mjs",
38
39
  "check:package-surface": "node scripts/check-package-surface.mjs",
39
- "prepack": "npm run clean && npm run build && npm run ui:ci && npm run build:ui && npm run check:package-surface",
40
- "prepublishOnly": "npm run clean && npm run build && npm run ui:ci && npm run build:ui && npm run check:package-surface",
40
+ "prepack": "npm run clean && npm run build && npm run prepare:bin && npm run ui:ci && npm run build:ui && npm run check:package-surface",
41
+ "prepublishOnly": "npm run clean && npm run build && npm run prepare:bin && npm run ui:ci && npm run build:ui && npm run check:package-surface",
41
42
  "clean": "rm -rf dist coverage"
42
43
  },
43
44
  "devDependencies": {