@codeledger/core 0.1.1
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 +27 -0
- package/dist/bundle-store.d.ts +10 -0
- package/dist/bundle-store.d.ts.map +1 -0
- package/dist/bundle-store.js +36 -0
- package/dist/bundle-store.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/ledger.d.ts +14 -0
- package/dist/ledger.d.ts.map +1 -0
- package/dist/ledger.js +109 -0
- package/dist/ledger.js.map +1 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Intelligent Context AI, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Note: This license applies to the CLI wrapper, types, repository scanning,
|
|
26
|
+
instrumentation, harness, and report packages (the "Plugin"). The scoring
|
|
27
|
+
engine (packages/core-engine/bin/) is licensed separately under LICENSE-CORE.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Database from 'better-sqlite3';
|
|
2
|
+
import type { BundleRecord, ContextBundle } from '@codeledger/types';
|
|
3
|
+
export declare class BundleStore {
|
|
4
|
+
private db;
|
|
5
|
+
constructor(db: Database.Database);
|
|
6
|
+
store(bundle: ContextBundle, runId?: string): void;
|
|
7
|
+
retrieve(bundleId: string): ContextBundle | null;
|
|
8
|
+
listByRun(runId: string): BundleRecord[];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=bundle-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-store.d.ts","sourceRoot":"","sources":["../src/bundle-store.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAErE,qBAAa,WAAW;IACtB,OAAO,CAAC,EAAE,CAAoB;gBAElB,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAIjC,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAmBlD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI;IAShD,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE;CAkBzC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export class BundleStore {
|
|
2
|
+
db;
|
|
3
|
+
constructor(db) {
|
|
4
|
+
this.db = db;
|
|
5
|
+
}
|
|
6
|
+
store(bundle, runId) {
|
|
7
|
+
const stmt = this.db.prepare(`INSERT INTO bundles (bundle_id, run_id, task, budget_tokens, budget_max_files,
|
|
8
|
+
sufficiency_threshold, cumulative_score, file_count, bundle_json)
|
|
9
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`);
|
|
10
|
+
stmt.run(bundle.bundle_id, runId ?? null, bundle.task, bundle.budget.tokens ?? null, bundle.budget.max_files ?? null, bundle.sufficiency_threshold, bundle.cumulative_score, bundle.files.length, JSON.stringify(bundle));
|
|
11
|
+
}
|
|
12
|
+
retrieve(bundleId) {
|
|
13
|
+
const stmt = this.db.prepare(`SELECT bundle_json FROM bundles WHERE bundle_id = ?`);
|
|
14
|
+
const row = stmt.get(bundleId);
|
|
15
|
+
if (!row)
|
|
16
|
+
return null;
|
|
17
|
+
return JSON.parse(row.bundle_json);
|
|
18
|
+
}
|
|
19
|
+
listByRun(runId) {
|
|
20
|
+
const stmt = this.db.prepare(`SELECT * FROM bundles WHERE run_id = ? ORDER BY created_at`);
|
|
21
|
+
const rows = stmt.all(runId);
|
|
22
|
+
return rows.map((r) => ({
|
|
23
|
+
bundle_id: r['bundle_id'],
|
|
24
|
+
run_id: r['run_id'] ?? null,
|
|
25
|
+
task: r['task'],
|
|
26
|
+
budget_tokens: r['budget_tokens'] ?? null,
|
|
27
|
+
budget_max_files: r['budget_max_files'] ?? null,
|
|
28
|
+
sufficiency_threshold: r['sufficiency_threshold'] ?? null,
|
|
29
|
+
cumulative_score: r['cumulative_score'] ?? null,
|
|
30
|
+
file_count: r['file_count'] ?? null,
|
|
31
|
+
bundle_json: r['bundle_json'],
|
|
32
|
+
created_at: r['created_at'],
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=bundle-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-store.js","sourceRoot":"","sources":["../src/bundle-store.ts"],"names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IAAI;YACvC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAW;YACzB,aAAa,EAAG,CAAC,CAAC,eAAe,CAAY,IAAI,IAAI;YACrD,gBAAgB,EAAG,CAAC,CAAC,kBAAkB,CAAY,IAAI,IAAI;YAC3D,qBAAqB,EAAG,CAAC,CAAC,uBAAuB,CAAY,IAAI,IAAI;YACrE,gBAAgB,EAAG,CAAC,CAAC,kBAAkB,CAAY,IAAI,IAAI;YAC3D,UAAU,EAAG,CAAC,CAAC,YAAY,CAAY,IAAI,IAAI;YAC/C,WAAW,EAAE,CAAC,CAAC,aAAa,CAAW;YACvC,UAAU,EAAE,CAAC,CAAC,YAAY,CAAW;SACtC,CAAC,CAAC,CAAC;IACN,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/ledger.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LedgerEvent, RunIdentity, RunRecord, RunStatus } from '@codeledger/types';
|
|
2
|
+
export declare class LedgerStore {
|
|
3
|
+
private db;
|
|
4
|
+
constructor(dbPath: string);
|
|
5
|
+
init(): void;
|
|
6
|
+
append(event: LedgerEvent): void;
|
|
7
|
+
appendMany(events: LedgerEvent[]): void;
|
|
8
|
+
startRun(run: RunIdentity): void;
|
|
9
|
+
finishRun(runId: string, status: RunStatus, summary?: unknown): void;
|
|
10
|
+
listRunEvents(runId: string): LedgerEvent[];
|
|
11
|
+
listScenarioRuns(scenarioId: string): RunRecord[];
|
|
12
|
+
close(): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger.d.ts","sourceRoot":"","sources":["../src/ledger.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,SAAS,EAEV,MAAM,mBAAmB,CAAC;AA2C3B,qBAAa,WAAW;IACtB,OAAO,CAAC,EAAE,CAAoB;gBAElB,MAAM,EAAE,MAAM;IAM1B,IAAI,IAAI,IAAI;IAIZ,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAchC,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI;IAavC,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI;IAiBhC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAQpE,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,EAAE;IAoB3C,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE;IAoBjD,KAAK,IAAI,IAAI;CAGd"}
|
package/dist/ledger.js
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import Database from 'better-sqlite3';
|
|
2
|
+
const SCHEMA = `
|
|
3
|
+
CREATE TABLE IF NOT EXISTS events (
|
|
4
|
+
event_id TEXT PRIMARY KEY,
|
|
5
|
+
run_id TEXT NOT NULL,
|
|
6
|
+
ts TEXT NOT NULL,
|
|
7
|
+
type TEXT NOT NULL,
|
|
8
|
+
payload TEXT NOT NULL,
|
|
9
|
+
created_at TEXT DEFAULT (datetime('now'))
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
CREATE TABLE IF NOT EXISTS runs (
|
|
13
|
+
run_id TEXT PRIMARY KEY,
|
|
14
|
+
scenario_id TEXT NOT NULL,
|
|
15
|
+
mode TEXT NOT NULL,
|
|
16
|
+
injection_mode TEXT,
|
|
17
|
+
repeat_num INTEGER NOT NULL,
|
|
18
|
+
agent TEXT,
|
|
19
|
+
git_ref TEXT,
|
|
20
|
+
started_at TEXT NOT NULL,
|
|
21
|
+
finished_at TEXT,
|
|
22
|
+
status TEXT DEFAULT 'running',
|
|
23
|
+
summary TEXT
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
CREATE TABLE IF NOT EXISTS bundles (
|
|
27
|
+
bundle_id TEXT PRIMARY KEY,
|
|
28
|
+
run_id TEXT,
|
|
29
|
+
task TEXT NOT NULL,
|
|
30
|
+
budget_tokens INTEGER,
|
|
31
|
+
budget_max_files INTEGER,
|
|
32
|
+
sufficiency_threshold REAL,
|
|
33
|
+
cumulative_score REAL,
|
|
34
|
+
file_count INTEGER,
|
|
35
|
+
bundle_json TEXT NOT NULL,
|
|
36
|
+
created_at TEXT DEFAULT (datetime('now'))
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
CREATE INDEX IF NOT EXISTS idx_events_run ON events(run_id);
|
|
40
|
+
CREATE INDEX IF NOT EXISTS idx_runs_scenario ON runs(scenario_id);
|
|
41
|
+
`;
|
|
42
|
+
export class LedgerStore {
|
|
43
|
+
db;
|
|
44
|
+
constructor(dbPath) {
|
|
45
|
+
this.db = new Database(dbPath);
|
|
46
|
+
this.db.pragma('journal_mode = WAL');
|
|
47
|
+
this.db.pragma('foreign_keys = ON');
|
|
48
|
+
}
|
|
49
|
+
init() {
|
|
50
|
+
this.db.exec(SCHEMA);
|
|
51
|
+
}
|
|
52
|
+
append(event) {
|
|
53
|
+
const stmt = this.db.prepare(`INSERT INTO events (event_id, run_id, ts, type, payload)
|
|
54
|
+
VALUES (?, ?, ?, ?, ?)`);
|
|
55
|
+
stmt.run(event.event_id, event.run_id, event.ts, event.type, JSON.stringify(event.payload));
|
|
56
|
+
}
|
|
57
|
+
appendMany(events) {
|
|
58
|
+
const stmt = this.db.prepare(`INSERT INTO events (event_id, run_id, ts, type, payload)
|
|
59
|
+
VALUES (?, ?, ?, ?, ?)`);
|
|
60
|
+
const tx = this.db.transaction((evts) => {
|
|
61
|
+
for (const e of evts) {
|
|
62
|
+
stmt.run(e.event_id, e.run_id, e.ts, e.type, JSON.stringify(e.payload));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
tx(events);
|
|
66
|
+
}
|
|
67
|
+
startRun(run) {
|
|
68
|
+
const stmt = this.db.prepare(`INSERT INTO runs (run_id, scenario_id, mode, injection_mode, repeat_num, agent, git_ref, started_at, status)
|
|
69
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, 'running')`);
|
|
70
|
+
stmt.run(run.run_id, run.scenario_id, run.mode, run.injection_mode, run.repeat_num, run.agent, run.git_ref, run.started_at);
|
|
71
|
+
}
|
|
72
|
+
finishRun(runId, status, summary) {
|
|
73
|
+
const now = new Date().toISOString();
|
|
74
|
+
const stmt = this.db.prepare(`UPDATE runs SET finished_at = ?, status = ?, summary = ? WHERE run_id = ?`);
|
|
75
|
+
stmt.run(now, status, summary ? JSON.stringify(summary) : null, runId);
|
|
76
|
+
}
|
|
77
|
+
listRunEvents(runId) {
|
|
78
|
+
const stmt = this.db.prepare(`SELECT event_id, run_id, ts, type, payload FROM events WHERE run_id = ? ORDER BY ts`);
|
|
79
|
+
const rows = stmt.all(runId);
|
|
80
|
+
return rows.map((r) => ({
|
|
81
|
+
event_id: r.event_id,
|
|
82
|
+
run_id: r.run_id,
|
|
83
|
+
ts: r.ts,
|
|
84
|
+
type: r.type,
|
|
85
|
+
payload: JSON.parse(r.payload),
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
listScenarioRuns(scenarioId) {
|
|
89
|
+
const stmt = this.db.prepare(`SELECT * FROM runs WHERE scenario_id = ? ORDER BY started_at`);
|
|
90
|
+
const rows = stmt.all(scenarioId);
|
|
91
|
+
return rows.map((r) => ({
|
|
92
|
+
run_id: r['run_id'],
|
|
93
|
+
scenario_id: r['scenario_id'],
|
|
94
|
+
mode: r['mode'],
|
|
95
|
+
injection_mode: r['injection_mode'] ?? null,
|
|
96
|
+
repeat_num: r['repeat_num'],
|
|
97
|
+
agent: r['agent'] ?? null,
|
|
98
|
+
git_ref: r['git_ref'] ?? null,
|
|
99
|
+
started_at: r['started_at'],
|
|
100
|
+
finished_at: r['finished_at'] ?? null,
|
|
101
|
+
status: r['status'],
|
|
102
|
+
summary: r['summary'] ? JSON.parse(r['summary']) : null,
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
close() {
|
|
106
|
+
this.db.close();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=ledger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger.js","sourceRoot":"","sources":["../src/ledger.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAStC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCd,CAAC;AAEF,MAAM,OAAO,WAAW;IACd,EAAE,CAAoB;IAE9B,YAAY,MAAc;QACxB,IAAI,CAAC,EAAE,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC/B,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;QACrC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;IACtC,CAAC;IAED,IAAI;QACF,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,KAAkB;QACvB,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAC1B;8BACwB,CACzB,CAAC;QACF,IAAI,CAAC,GAAG,CACN,KAAK,CAA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AAU,EAAE,CAAC,CAAC,YAAY,CAAW;YACrC,WAAW,EAAG,CAAC,CAAC,aAAa,CAAY,IAAI,IAAI;YACjD,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAc;YAChC,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAW,CAAC,CAAC,CAAC,CAAC,IAAI;SAClE,CAAC,CAAC,CAAC;IACN,CAAC;IAED,KAAK;QACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codeledger/core",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "SQLite append-only ledger for CodeLedger events and runs",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/codeledgerECF/codeledger-blackbox.git",
|
|
10
|
+
"directory": "packages/core"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"main": "./dist/index.js",
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"import": "./dist/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"better-sqlite3": "^11.0.0",
|
|
28
|
+
"@codeledger/types": "0.1.1"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/better-sqlite3": "^7.6.0",
|
|
32
|
+
"typescript": "^5.4.0"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsc",
|
|
36
|
+
"typecheck": "tsc --noEmit",
|
|
37
|
+
"clean": "rm -rf dist"
|
|
38
|
+
}
|
|
39
|
+
}
|