@jmtrin/opencode-kevin 0.6.0 → 0.8.0

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 (83) hide show
  1. package/README.md +771 -580
  2. package/dist/migrations/001_initial.sql +91 -91
  3. package/dist/migrations/003_v02_signal.sql +57 -57
  4. package/dist/migrations/004_v03_knowledge.sql +138 -138
  5. package/dist/migrations/005_v04_signal.sql +57 -57
  6. package/dist/migrations/006_v05_glassbox.sql +118 -118
  7. package/dist/migrations/007_v06_pull.sql +144 -144
  8. package/dist/migrations/008_v07_truth.sql +124 -0
  9. package/dist/migrations/009_v08_team.sql +100 -0
  10. package/dist/plugin/ArtifactWriter.d.ts +28 -0
  11. package/dist/plugin/ArtifactWriter.js +35 -2
  12. package/dist/plugin/ArtifactWriter.js.map +1 -1
  13. package/dist/plugin/ConflictDetector.d.ts +35 -0
  14. package/dist/plugin/ConflictDetector.js +283 -0
  15. package/dist/plugin/ConflictDetector.js.map +1 -0
  16. package/dist/plugin/ContextInjector.d.ts +9 -0
  17. package/dist/plugin/ContextInjector.js +14 -3
  18. package/dist/plugin/ContextInjector.js.map +1 -1
  19. package/dist/plugin/ConventionMiner.d.ts +35 -0
  20. package/dist/plugin/ConventionMiner.js +243 -0
  21. package/dist/plugin/ConventionMiner.js.map +1 -0
  22. package/dist/plugin/Curator.d.ts +22 -2
  23. package/dist/plugin/Curator.js +101 -28
  24. package/dist/plugin/Curator.js.map +1 -1
  25. package/dist/plugin/InjectionLedger.d.ts +6 -0
  26. package/dist/plugin/InjectionLedger.js +6 -0
  27. package/dist/plugin/InjectionLedger.js.map +1 -1
  28. package/dist/plugin/Materializer.d.ts +4 -5
  29. package/dist/plugin/Materializer.js +9 -6
  30. package/dist/plugin/Materializer.js.map +1 -1
  31. package/dist/plugin/MemoryService.d.ts +49 -2
  32. package/dist/plugin/MemoryService.js +306 -8
  33. package/dist/plugin/MemoryService.js.map +1 -1
  34. package/dist/plugin/Migrate.js +61 -2
  35. package/dist/plugin/Migrate.js.map +1 -1
  36. package/dist/plugin/Reflector.js +13 -0
  37. package/dist/plugin/Reflector.js.map +1 -1
  38. package/dist/plugin/RepoIdentity.d.ts +113 -0
  39. package/dist/plugin/RepoIdentity.js +266 -0
  40. package/dist/plugin/RepoIdentity.js.map +1 -0
  41. package/dist/plugin/RepoTruth.d.ts +80 -0
  42. package/dist/plugin/RepoTruth.js +600 -0
  43. package/dist/plugin/RepoTruth.js.map +1 -0
  44. package/dist/plugin/Retrospective.js +17 -0
  45. package/dist/plugin/Retrospective.js.map +1 -1
  46. package/dist/plugin/SharedLayer.d.ts +159 -0
  47. package/dist/plugin/SharedLayer.js +463 -0
  48. package/dist/plugin/SharedLayer.js.map +1 -0
  49. package/dist/plugin/index.d.ts +36 -2
  50. package/dist/plugin/index.js +591 -10
  51. package/dist/plugin/index.js.map +1 -1
  52. package/dist/plugin/kevin_approve.js +7 -4
  53. package/dist/plugin/kevin_approve.js.map +1 -1
  54. package/dist/plugin/kevin_audit.d.ts +59 -1
  55. package/dist/plugin/kevin_audit.js +190 -3
  56. package/dist/plugin/kevin_audit.js.map +1 -1
  57. package/dist/plugin/kevin_conflicts.d.ts +9 -0
  58. package/dist/plugin/kevin_conflicts.js +51 -0
  59. package/dist/plugin/kevin_conflicts.js.map +1 -0
  60. package/dist/plugin/kevin_facts.d.ts +42 -0
  61. package/dist/plugin/kevin_facts.js +37 -0
  62. package/dist/plugin/kevin_facts.js.map +1 -0
  63. package/dist/plugin/metrics.d.ts +3 -3
  64. package/dist/plugin/metrics.js +21 -2
  65. package/dist/plugin/metrics.js.map +1 -1
  66. package/dist/plugin/okf-export.d.ts +2 -2
  67. package/dist/plugin/okf-export.js +15 -7
  68. package/dist/plugin/okf-export.js.map +1 -1
  69. package/dist/plugin/okf.d.ts +107 -0
  70. package/dist/plugin/okf.js +304 -0
  71. package/dist/plugin/okf.js.map +1 -0
  72. package/dist/plugin/replay-types.d.ts +29 -287
  73. package/dist/plugin/replay-types.js +145 -53
  74. package/dist/plugin/replay-types.js.map +1 -1
  75. package/migrations/001_initial.sql +91 -91
  76. package/migrations/003_v02_signal.sql +57 -57
  77. package/migrations/004_v03_knowledge.sql +138 -138
  78. package/migrations/005_v04_signal.sql +57 -57
  79. package/migrations/006_v05_glassbox.sql +118 -118
  80. package/migrations/007_v06_pull.sql +144 -144
  81. package/migrations/008_v07_truth.sql +124 -0
  82. package/migrations/009_v08_team.sql +100 -0
  83. package/package.json +4 -4
@@ -1,16 +1,50 @@
1
1
  import type { Plugin } from "@opencode-ai/plugin";
2
+ import { Store } from "./Store.js";
2
3
  export interface KevinPluginOptions {
3
4
  dbPath?: string;
4
5
  migrationsDir?: string;
5
6
  retrospectivesDir?: string;
6
7
  throttleMs?: number;
7
- /** v0.6.0 (K6-018) test-only override for the pull-bundle root. */
8
+ /** v0.6.0 (K6-018) - test-only override for the pull-bundle root. */
8
9
  materializerRoot?: string;
10
+ /** v0.7.0 (K7-009) - repository root RepoTruth scans. Defaults to
11
+ * `process.cwd()`. Test-only override so a fixture project can stand in
12
+ * for the working directory. */
13
+ projectRoot?: string;
9
14
  }
10
15
  /**
11
16
  * v0.4.0 (K4-021) — settings surfaced by `kevin_config` (plan §8.8).
12
17
  * Unknown keys are rejected on `set` unless `strict: false`.
13
18
  */
14
- export declare const KEVIN_CONFIG_KEYS: readonly ["quality_gate_enabled", "lesson_snippet_injection", "patternminer_enabled", "cross_project_enabled", "llm_reflection_enabled", "tool_calls_dedup_enabled", "deterministic_retrieval", "pre_prompt_budget_tokens", "archive_after_days", "curation_enabled", "agents_md_path", "skill_emission_enabled", "reference_emission_enabled", "injection_confidence_floor"];
19
+ export declare const KEVIN_CONFIG_KEYS: readonly ["quality_gate_enabled", "lesson_snippet_injection", "patternminer_enabled", "cross_project_enabled", "llm_reflection_enabled", "tool_calls_dedup_enabled", "deterministic_retrieval", "pre_prompt_budget_tokens", "archive_after_days", "curation_enabled", "agents_md_path", "skill_emission_enabled", "reference_emission_enabled", "injection_confidence_floor", "repo_truth_enabled", "convention_mining_enabled", "conflict_detection_enabled", "error_lesson_mode", "shared_layer_enabled", "okf_path", "share_requires_approval", "author_identity_mode", "shared_confidence_floor"];
20
+ export declare const ERROR_LESSON_MODE_VALUES: readonly ["all", "triage_only"];
21
+ /** Plugin release version — stamped into generated files (K8-021/027). */
22
+ export declare const KEVIN_VERSION = "0.8.0";
23
+ export interface RekeyCounts {
24
+ memories: number;
25
+ shared_entries: number;
26
+ okf_imports: number;
27
+ }
28
+ export interface RekeyResult {
29
+ action: "rekey";
30
+ ok: boolean;
31
+ reason?: string;
32
+ /** Present on a dry run (no `confirm`): nothing was mutated. */
33
+ dry_run?: boolean;
34
+ /** The resolved id the corpus would move to. */
35
+ to_repo_id?: string;
36
+ /** Per source repo_id, the rows that would move (from-value → counts). */
37
+ from?: Record<string, RekeyCounts>;
38
+ /** Total rows that would move, per table. */
39
+ rows?: RekeyCounts;
40
+ /** A monorepo collision was detected (refused unless `force`). */
41
+ collision?: boolean;
42
+ /** Present on a successful confirmed run. */
43
+ rekeyed?: boolean;
44
+ }
45
+ export declare function performRekey(store: Store, toRepoId: string, opts: {
46
+ confirm: boolean;
47
+ force?: boolean;
48
+ }): RekeyResult;
15
49
  export declare const KevinPlugin: Plugin;
16
50
  export default KevinPlugin;