@jmtrin/opencode-kevin 1.0.0 → 1.1.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.
- package/LICENSE +21 -0
- package/README.md +24 -7
- package/dist/migrations/001_initial.sql +91 -91
- package/dist/migrations/002_indexes.sql +13 -13
- package/dist/migrations/003_v02_signal.sql +57 -57
- package/dist/migrations/004_v03_knowledge.sql +138 -138
- package/dist/migrations/005_v04_signal.sql +57 -57
- package/dist/migrations/006_v05_glassbox.sql +118 -118
- package/dist/migrations/007_v06_pull.sql +144 -144
- package/dist/migrations/012_v11_drift.sql +24 -0
- package/dist/plugin/Archiver.js +2 -17
- package/dist/plugin/CausalChain.js +32 -13
- package/dist/plugin/ConflictDetector.js +7 -29
- package/dist/plugin/Feedback.js +2 -19
- package/dist/plugin/HookLiveness.d.ts +1 -0
- package/dist/plugin/HookLiveness.js +11 -27
- package/dist/plugin/InjectionLedger.js +104 -57
- package/dist/plugin/Materializer.js +1 -88
- package/dist/plugin/MemoryService.d.ts +59 -1
- package/dist/plugin/MemoryService.js +13 -106
- package/dist/plugin/Migrate.js +5 -0
- package/dist/plugin/Retrospective.js +4 -0
- package/dist/plugin/ToolCallObserver.js +18 -5
- package/dist/plugin/columns.d.ts +11 -0
- package/dist/plugin/columns.js +54 -0
- package/dist/plugin/contract.d.ts +8 -0
- package/dist/plugin/contract.js +20 -5
- package/dist/plugin/index.d.ts +1 -1
- package/dist/plugin/index.js +24 -3
- package/dist/plugin/kevin_forget.d.ts +33 -0
- package/dist/plugin/kevin_forget.js +260 -0
- package/dist/plugin/kevin_why.js +1 -18
- package/dist/plugin/metrics.d.ts +1 -1
- package/dist/plugin/metrics.js +4 -0
- package/dist/plugin/query-tokenizer.js +56 -8
- package/dist/plugin/time-ms.d.ts +1 -0
- package/dist/plugin/time-ms.js +16 -0
- package/package.json +2 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// v1.1.0 (K11-003/K11-004 / plan §5.2, D11-01) — millisecond helper.
|
|
2
|
+
// Readers prefer _ms and fall back to legacy second-granularity column.
|
|
3
|
+
// The helper is the single implementation imported by InjectionLedger and
|
|
4
|
+
// CausalChain (moved here in K11-004 to avoid duplication).
|
|
5
|
+
export function toMs(legacyValue, msValue) {
|
|
6
|
+
if (typeof msValue === "number" && !Number.isNaN(msValue))
|
|
7
|
+
return msValue;
|
|
8
|
+
if (!legacyValue)
|
|
9
|
+
return null;
|
|
10
|
+
// SQLite datetime('now') is 'YYYY-MM-DD HH:MM:SS' UTC
|
|
11
|
+
const iso = legacyValue.includes("T")
|
|
12
|
+
? legacyValue
|
|
13
|
+
: `${legacyValue.replace(" ", "T")}Z`;
|
|
14
|
+
const n = Date.parse(iso);
|
|
15
|
+
return Number.isNaN(n) ? null : n;
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jmtrin/opencode-kevin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Kevin — Observa y aprende: capa de aprendizaje para OpenCode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/plugin/index.js",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"bench": "node --import tsx scripts/bench.ts",
|
|
28
28
|
"gen:corpus": "node --import tsx scripts/gen-corpus.ts",
|
|
29
29
|
"bench:check": "node --import tsx scripts/bench-check.ts",
|
|
30
|
+
"bench:regress": "tsx scripts/bench-regress.ts",
|
|
30
31
|
"replay": "node --import tsx scripts/replay.ts",
|
|
31
32
|
"measure:mix": "node --import tsx scripts/measure-mix.ts"
|
|
32
33
|
},
|