zevqi 0.0.0-stage → 0.5.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 +183 -2
- package/package.json +48 -4
- package/packages/cli/dist/agents.js +106 -0
- package/packages/cli/dist/ai.js +93 -0
- package/packages/cli/dist/args.js +30 -0
- package/packages/cli/dist/attest.js +97 -0
- package/packages/cli/dist/cli.js +41 -0
- package/packages/cli/dist/commands/check.js +91 -0
- package/packages/cli/dist/commands/daily.js +184 -0
- package/packages/cli/dist/commands/hook.js +25 -0
- package/packages/cli/dist/commands/index.js +52 -0
- package/packages/cli/dist/commands/lesson.js +91 -0
- package/packages/cli/dist/commands/quickstart.js +72 -0
- package/packages/cli/dist/commands/scan.js +67 -0
- package/packages/cli/dist/commands/setup.js +145 -0
- package/packages/cli/dist/commands/team.js +76 -0
- package/packages/cli/dist/config.js +53 -0
- package/packages/cli/dist/context.js +32 -0
- package/packages/cli/dist/env.js +4 -0
- package/packages/cli/dist/git.js +229 -0
- package/packages/cli/dist/hooks.js +164 -0
- package/packages/cli/dist/lessons.js +83 -0
- package/packages/cli/dist/nudge.js +42 -0
- package/packages/cli/dist/quiz.js +104 -0
- package/packages/cli/dist/scan.js +87 -0
- package/packages/cli/dist/server.js +122 -0
- package/packages/cli/dist/stats.js +84 -0
- package/packages/cli/dist/team.js +128 -0
- package/packages/cli/dist/util.js +153 -0
- package/packages/cli/dist/version.js +15 -0
- package/packages/cli/package.json +49 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// Local progress: streaks, XP and levels. Same rules as the team dashboard, so numbers match everywhere.
|
|
2
|
+
// XP rewards understanding, never volume alone: a passed lesson is worth 20, a perfect score +10, an honest attempt 5.
|
|
3
|
+
export const LEVELS = ["Rookie", "Reader", "Tracer", "Navigator", "Architect", "Sage"];
|
|
4
|
+
const DAY = 86_400_000;
|
|
5
|
+
export function lessonXp(l) {
|
|
6
|
+
if (l.status === "passed")
|
|
7
|
+
return 20 + (l.correct != null && l.total != null && l.correct === l.total ? 10 : 0);
|
|
8
|
+
return l.status === "failed" ? 5 : 0;
|
|
9
|
+
}
|
|
10
|
+
export function levelFor(xp) {
|
|
11
|
+
const level = Math.min(LEVELS.length, Math.floor(Math.sqrt(xp / 60)) + 1);
|
|
12
|
+
if (level >= LEVELS.length)
|
|
13
|
+
return { level, progress: 1, toNext: 0 };
|
|
14
|
+
const floor = 60 * (level - 1) ** 2;
|
|
15
|
+
const ceil = 60 * level ** 2;
|
|
16
|
+
return { level, progress: Math.max(0, Math.min(1, (xp - floor) / (ceil - floor))), toNext: Math.max(0, ceil - xp) };
|
|
17
|
+
}
|
|
18
|
+
const dayKey = (t) => new Date(t).toISOString().slice(0, 10);
|
|
19
|
+
/** Consecutive UTC days with a passed lesson, ending today or yesterday (a streak survives until the end of the next day). */
|
|
20
|
+
export function streaks(days, now) {
|
|
21
|
+
let best = 0;
|
|
22
|
+
let run = 0;
|
|
23
|
+
let prev = null;
|
|
24
|
+
for (const d of [...days].sort()) {
|
|
25
|
+
const t = Date.parse(d);
|
|
26
|
+
run = prev !== null && t - prev === DAY ? run + 1 : 1;
|
|
27
|
+
best = Math.max(best, run);
|
|
28
|
+
prev = t;
|
|
29
|
+
}
|
|
30
|
+
let current = 0;
|
|
31
|
+
let cursor = Date.parse(dayKey(now));
|
|
32
|
+
if (!days.has(dayKey(cursor)))
|
|
33
|
+
cursor -= DAY;
|
|
34
|
+
while (days.has(dayKey(cursor))) {
|
|
35
|
+
current++;
|
|
36
|
+
cursor -= DAY;
|
|
37
|
+
}
|
|
38
|
+
return { current, best };
|
|
39
|
+
}
|
|
40
|
+
export function computeStats(lessons, now = Date.now()) {
|
|
41
|
+
const days = new Set();
|
|
42
|
+
const files = new Set();
|
|
43
|
+
let xp = 0;
|
|
44
|
+
let passed = 0;
|
|
45
|
+
let failed = 0;
|
|
46
|
+
let pending = 0;
|
|
47
|
+
let weekPassed = 0;
|
|
48
|
+
for (const l of lessons) {
|
|
49
|
+
xp += lessonXp(l);
|
|
50
|
+
if (l.status === "passed") {
|
|
51
|
+
passed++;
|
|
52
|
+
const t = Date.parse(l.completedAt ?? l.createdAt);
|
|
53
|
+
days.add(dayKey(t));
|
|
54
|
+
l.changedFiles.forEach((f) => files.add(f));
|
|
55
|
+
if (now - t < 7 * DAY)
|
|
56
|
+
weekPassed++;
|
|
57
|
+
}
|
|
58
|
+
else if (l.status === "failed")
|
|
59
|
+
failed++;
|
|
60
|
+
else
|
|
61
|
+
pending++;
|
|
62
|
+
}
|
|
63
|
+
const lv = levelFor(xp);
|
|
64
|
+
const st = streaks(days, now);
|
|
65
|
+
return {
|
|
66
|
+
xp,
|
|
67
|
+
level: lv.level,
|
|
68
|
+
levelName: LEVELS[lv.level - 1],
|
|
69
|
+
levelProgress: lv.progress,
|
|
70
|
+
xpToNext: lv.toNext,
|
|
71
|
+
streak: st.current,
|
|
72
|
+
bestStreak: st.best,
|
|
73
|
+
passed,
|
|
74
|
+
failed,
|
|
75
|
+
pending,
|
|
76
|
+
filesUnderstood: files.size,
|
|
77
|
+
weekPassed,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/** A fixed-width progress bar such as `███████░░░░░`. */
|
|
81
|
+
export function bar(fraction, width = 20) {
|
|
82
|
+
const filled = Math.max(0, Math.min(width, Math.round(fraction * width)));
|
|
83
|
+
return "█".repeat(filled) + "░".repeat(width - filled);
|
|
84
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { globalDir, loadGlobal, saveGlobal } from "./config.js";
|
|
3
|
+
import { readJson, writeJson } from "./util.js";
|
|
4
|
+
import { envVar } from "./env.js";
|
|
5
|
+
/** Team credentials for CI: ZEVQI_TEAM_KEY (+ ZEVQI_SERVER) win over the saved team, so no `team join` is needed in a pipeline. */
|
|
6
|
+
export function resolveTeam() {
|
|
7
|
+
const key = envVar("TEAM_KEY");
|
|
8
|
+
if (key)
|
|
9
|
+
return { server: envVar("SERVER") || loadGlobal().team?.server || "https://zevqi.com", key };
|
|
10
|
+
const t = loadGlobal().team;
|
|
11
|
+
return t ? { server: t.server, key: t.key } : null;
|
|
12
|
+
}
|
|
13
|
+
/** Ask the team server which of these files have AI changes nobody has understood. */
|
|
14
|
+
export async function checkFiles(files, repo) {
|
|
15
|
+
const team = resolveTeam();
|
|
16
|
+
if (!team)
|
|
17
|
+
return { error: "No team key found.", setup: true };
|
|
18
|
+
try {
|
|
19
|
+
return (await call(team, "POST", "/api/learn/v1/check", { files, repo }));
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
return { error: e instanceof Error ? e.message : String(e) };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const outbox = () => path.join(globalDir(), "outbox.json");
|
|
26
|
+
export function toRecord(lesson, share) {
|
|
27
|
+
return {
|
|
28
|
+
id: lesson.id,
|
|
29
|
+
repo: lesson.repo,
|
|
30
|
+
files: lesson.changedFiles,
|
|
31
|
+
status: lesson.status,
|
|
32
|
+
correct: lesson.correct ?? null,
|
|
33
|
+
// An attested review has no questions and no score, so it sends none. The server shows it as attested.
|
|
34
|
+
total: lesson.explainer === "none" ? null : lesson.total ?? lesson.questions.length,
|
|
35
|
+
createdAt: lesson.createdAt,
|
|
36
|
+
completedAt: lesson.completedAt ?? null,
|
|
37
|
+
...(lesson.revs && Object.keys(lesson.revs).length ? { revs: lesson.revs } : {}),
|
|
38
|
+
...(lesson.response ? { response: lesson.response } : {}),
|
|
39
|
+
// What is unclear is the developer's own text about the code, so it leaves the machine only when they chose to share summaries.
|
|
40
|
+
...(share === "summaries" ? { summary: lesson.summary, ...(lesson.note ? { openQuestions: [lesson.note] } : {}) } : {}),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
async function call(team, method, route, body) {
|
|
44
|
+
const res = await fetch(`${team.server.replace(/\/$/, "")}${route}`, {
|
|
45
|
+
method,
|
|
46
|
+
headers: { "content-type": "application/json", authorization: `Bearer ${team.key}` },
|
|
47
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
48
|
+
signal: AbortSignal.timeout(15_000),
|
|
49
|
+
});
|
|
50
|
+
const json = await res.json().catch(() => ({}));
|
|
51
|
+
if (!res.ok)
|
|
52
|
+
throw new Error(json?.error || `Team server returned ${res.status}`);
|
|
53
|
+
return json;
|
|
54
|
+
}
|
|
55
|
+
export async function createTeam(server, name, secret) {
|
|
56
|
+
const res = await fetch(`${server.replace(/\/$/, "")}/api/learn/v1/teams`, {
|
|
57
|
+
method: "POST",
|
|
58
|
+
headers: { "content-type": "application/json", ...(secret ? { "x-create-secret": secret } : {}) },
|
|
59
|
+
body: JSON.stringify({ name }),
|
|
60
|
+
signal: AbortSignal.timeout(15_000),
|
|
61
|
+
});
|
|
62
|
+
const json = await res.json().catch(() => ({}));
|
|
63
|
+
if (!res.ok)
|
|
64
|
+
throw new Error(json?.error || `Team server returned ${res.status}`);
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
/** Confirms a team key with the server before saving it, so a typo fails now instead of at the first sync. */
|
|
68
|
+
export async function checkTeamKey(server, key) {
|
|
69
|
+
try {
|
|
70
|
+
const res = await fetch(`${server.replace(/\/$/, "")}/api/learn/v1/summary`, { headers: { authorization: `Bearer ${key}` }, signal: AbortSignal.timeout(10_000) });
|
|
71
|
+
if (res.status === 401)
|
|
72
|
+
return { ok: false, reason: "invalid", message: "That team key was not recognised. Check it with your admin." };
|
|
73
|
+
const json = (await res.json().catch(() => ({})));
|
|
74
|
+
if (!res.ok)
|
|
75
|
+
return { ok: false, reason: "unreachable", message: `The team server answered ${res.status}.` };
|
|
76
|
+
return { ok: true, teamName: json.team?.name };
|
|
77
|
+
}
|
|
78
|
+
catch (e) {
|
|
79
|
+
return { ok: false, reason: "unreachable", message: e instanceof Error ? e.message : String(e) };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export function joinTeam(server, key, email, name) {
|
|
83
|
+
const cfg = loadGlobal();
|
|
84
|
+
cfg.team = { server, key, email, name };
|
|
85
|
+
saveGlobal(cfg);
|
|
86
|
+
}
|
|
87
|
+
export function leaveTeam() {
|
|
88
|
+
const cfg = loadGlobal();
|
|
89
|
+
delete cfg.team;
|
|
90
|
+
saveGlobal(cfg);
|
|
91
|
+
}
|
|
92
|
+
/** Upload lessons to the team dashboard. Failed uploads are queued and retried on the next sync. */
|
|
93
|
+
export async function pushRecords(records) {
|
|
94
|
+
const team = loadGlobal().team;
|
|
95
|
+
if (!team)
|
|
96
|
+
return { sent: 0, queued: 0 };
|
|
97
|
+
const queued = readJson(outbox(), []);
|
|
98
|
+
const all = [...queued, ...records];
|
|
99
|
+
if (all.length === 0)
|
|
100
|
+
return { sent: 0, queued: 0 };
|
|
101
|
+
// Same lesson may be queued twice (pending, then passed): keep the latest state per id.
|
|
102
|
+
const latest = new Map();
|
|
103
|
+
for (const r of all)
|
|
104
|
+
latest.set(r.id, r);
|
|
105
|
+
const batch = [...latest.values()];
|
|
106
|
+
try {
|
|
107
|
+
await call(team, "POST", "/api/learn/v1/records", { member: { email: team.email, name: team.name }, lessons: batch });
|
|
108
|
+
writeJson(outbox(), []);
|
|
109
|
+
return { sent: batch.length, queued: 0 };
|
|
110
|
+
}
|
|
111
|
+
catch (e) {
|
|
112
|
+
writeJson(outbox(), batch.slice(-500));
|
|
113
|
+
return { sent: 0, queued: batch.length, error: e instanceof Error ? e.message : String(e) };
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/** Upload a git knowledge map. Throws with the server's message on failure. */
|
|
117
|
+
export async function pushScan(payload) {
|
|
118
|
+
const team = resolveTeam();
|
|
119
|
+
if (!team)
|
|
120
|
+
throw new Error("Not connected to a team. Run: zevqi team join --server <url> --key <key> --email <you>");
|
|
121
|
+
return call(team, "POST", "/api/learn/v1/scan", payload);
|
|
122
|
+
}
|
|
123
|
+
export async function teamSummary() {
|
|
124
|
+
const team = loadGlobal().team;
|
|
125
|
+
if (!team)
|
|
126
|
+
throw new Error("Not connected to a team. Run: zevqi team join --server <url> --key <key> --email <you>");
|
|
127
|
+
return call(team, "GET", "/api/learn/v1/summary");
|
|
128
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import crypto from "node:crypto";
|
|
4
|
+
// Colour is on only for a real terminal, and never when NO_COLOR is set (https://no-color.org) or FORCE_COLOR=0.
|
|
5
|
+
const colourOn = () => {
|
|
6
|
+
if (process.env.NO_COLOR !== undefined && process.env.NO_COLOR !== "")
|
|
7
|
+
return false;
|
|
8
|
+
if (process.env.FORCE_COLOR === "0")
|
|
9
|
+
return false;
|
|
10
|
+
if (process.env.FORCE_COLOR)
|
|
11
|
+
return true;
|
|
12
|
+
return Boolean(process.stdout.isTTY);
|
|
13
|
+
};
|
|
14
|
+
const paint = (code) => (s) => (colourOn() ? `\x1b[${code}m${s}\x1b[0m` : s);
|
|
15
|
+
export const c = {
|
|
16
|
+
bold: paint("1"),
|
|
17
|
+
dim: paint("2"),
|
|
18
|
+
green: paint("32"),
|
|
19
|
+
red: paint("31"),
|
|
20
|
+
yellow: paint("33"),
|
|
21
|
+
cyan: paint("36"),
|
|
22
|
+
};
|
|
23
|
+
export class CliError extends Error {
|
|
24
|
+
code;
|
|
25
|
+
hint;
|
|
26
|
+
constructor(message, code = 1, hint) {
|
|
27
|
+
super(message);
|
|
28
|
+
this.code = code;
|
|
29
|
+
this.hint = hint;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function uid(prefix = "") {
|
|
33
|
+
return prefix + crypto.randomBytes(6).toString("hex");
|
|
34
|
+
}
|
|
35
|
+
export function readJson(file, fallback) {
|
|
36
|
+
try {
|
|
37
|
+
return JSON.parse(fs.readFileSync(file, "utf8"));
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return fallback;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** Atomic write (temp file + rename), so a crash never leaves half a JSON file behind. */
|
|
44
|
+
export function writeJson(file, data, mode) {
|
|
45
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
46
|
+
const tmp = `${file}.${process.pid}.tmp`;
|
|
47
|
+
fs.writeFileSync(tmp, JSON.stringify(data, null, 2), mode ? { mode } : undefined);
|
|
48
|
+
fs.renameSync(tmp, file);
|
|
49
|
+
}
|
|
50
|
+
export async function readStdin() {
|
|
51
|
+
if (process.stdin.isTTY)
|
|
52
|
+
return "";
|
|
53
|
+
const chunks = [];
|
|
54
|
+
for await (const chunk of process.stdin)
|
|
55
|
+
chunks.push(chunk);
|
|
56
|
+
return Buffer.concat(chunks).toString("utf8");
|
|
57
|
+
}
|
|
58
|
+
/** Reads a secret without echoing it. Falls back to one line of piped input when stdin is not a terminal. */
|
|
59
|
+
export async function readSecret(prompt) {
|
|
60
|
+
process.stderr.write(prompt);
|
|
61
|
+
const stdin = process.stdin;
|
|
62
|
+
if (!stdin.isTTY) {
|
|
63
|
+
const text = await readStdin();
|
|
64
|
+
process.stderr.write("\n");
|
|
65
|
+
return text.split(/\r?\n/)[0]?.trim() ?? "";
|
|
66
|
+
}
|
|
67
|
+
return new Promise((resolve, reject) => {
|
|
68
|
+
let value = "";
|
|
69
|
+
stdin.setRawMode(true);
|
|
70
|
+
stdin.resume();
|
|
71
|
+
stdin.setEncoding("utf8");
|
|
72
|
+
const done = (err) => {
|
|
73
|
+
stdin.setRawMode(false);
|
|
74
|
+
stdin.pause();
|
|
75
|
+
stdin.removeListener("data", onData);
|
|
76
|
+
process.stderr.write("\n");
|
|
77
|
+
err ? reject(err) : resolve(value.trim());
|
|
78
|
+
};
|
|
79
|
+
const onData = (chunk) => {
|
|
80
|
+
for (const ch of chunk) {
|
|
81
|
+
if (ch === "\r" || ch === "\n")
|
|
82
|
+
return done();
|
|
83
|
+
if (ch === "\u0003")
|
|
84
|
+
return done(new CliError("Cancelled.", 130));
|
|
85
|
+
if (ch === "\u007f" || ch === "\b")
|
|
86
|
+
value = value.slice(0, -1);
|
|
87
|
+
else if (ch >= " ")
|
|
88
|
+
value += ch;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
stdin.on("data", onData);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
export function escapeHtml(s) {
|
|
95
|
+
return String(s ?? "").replace(/[&<>"']/g, (ch) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[ch]);
|
|
96
|
+
}
|
|
97
|
+
export function timeAgo(iso) {
|
|
98
|
+
const ms = Date.now() - Date.parse(iso);
|
|
99
|
+
if (!Number.isFinite(ms) || ms < 0)
|
|
100
|
+
return "just now";
|
|
101
|
+
const m = Math.floor(ms / 60000);
|
|
102
|
+
if (m < 1)
|
|
103
|
+
return "just now";
|
|
104
|
+
if (m < 60)
|
|
105
|
+
return `${m}m ago`;
|
|
106
|
+
const h = Math.floor(m / 60);
|
|
107
|
+
if (h < 24)
|
|
108
|
+
return `${h}h ago`;
|
|
109
|
+
return `${Math.floor(h / 24)}d ago`;
|
|
110
|
+
}
|
|
111
|
+
export function toPosix(p) {
|
|
112
|
+
return p.replace(/\\/g, "/");
|
|
113
|
+
}
|
|
114
|
+
/** Masks a secret for display: first 6 characters, never the rest. */
|
|
115
|
+
export function mask(secret) {
|
|
116
|
+
return secret ? `${secret.slice(0, 6)}…` : "(not set)";
|
|
117
|
+
}
|
|
118
|
+
/** Throws a CliError; the entry point prints it and sets the exit code. */
|
|
119
|
+
export function fail(message, code = 1, hint) {
|
|
120
|
+
throw new CliError(message, code, hint);
|
|
121
|
+
}
|
|
122
|
+
/** One visible line from a terminal (for yes/no questions). */
|
|
123
|
+
export async function askLine(prompt) {
|
|
124
|
+
const rl = (await import("node:readline/promises")).createInterface({ input: process.stdin, output: process.stderr });
|
|
125
|
+
try {
|
|
126
|
+
return await rl.question(prompt);
|
|
127
|
+
}
|
|
128
|
+
finally {
|
|
129
|
+
rl.close();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* What Zevqi sends, in plain words. Shown at init (and once for older installs). With no API key nothing goes to any model
|
|
134
|
+
* provider, and the text says so instead of describing a provider that is not in use.
|
|
135
|
+
*/
|
|
136
|
+
export function aiDisclosure(provider, maxFiles, keyed = true) {
|
|
137
|
+
if (!keyed) {
|
|
138
|
+
return [
|
|
139
|
+
"What Zevqi sends, and where:",
|
|
140
|
+
" - No API key is set, so nothing is sent to any model provider.",
|
|
141
|
+
" - Nowhere else. Your team, and zevqi.com, never receive code, diffs, explanations or questions.",
|
|
142
|
+
" - If you join a team: file paths, a content fingerprint, your own answer, and for zevqi scan commit counts and pseudonymous author ids. Summaries and notes only if you turn on sharing.",
|
|
143
|
+
` - If you add an API key later, the diff of the files your agent changed (new files in full, up to ${maxFiles} files and about 60 KB per lesson) goes to that provider under your own account, and you will be told first.`,
|
|
144
|
+
].join("\n");
|
|
145
|
+
}
|
|
146
|
+
return [
|
|
147
|
+
"What Zevqi sends, and where:",
|
|
148
|
+
` - To ${provider}, using your own API key: the diff of the files your agent changed (new files in full), up to ${maxFiles} files and about 60 KB per lesson.`,
|
|
149
|
+
" - Nowhere else. Your team, and zevqi.com, never receive code, diffs, explanations or questions.",
|
|
150
|
+
" - If you join a team: file paths, a content fingerprint, your score and your own answer. Summaries and notes only if you turn on sharing.",
|
|
151
|
+
" - Do not use Zevqi on repositories whose code your provider agreement does not allow you to send to that provider.",
|
|
152
|
+
].join("\n");
|
|
153
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
/** The version in package.json, so `zevqi --version` can never drift from the published package. */
|
|
5
|
+
function readVersion() {
|
|
6
|
+
try {
|
|
7
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(here, "..", "package.json"), "utf8"));
|
|
9
|
+
return pkg.version ?? "0.0.0";
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return "0.0.0";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export const VERSION = readVersion();
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "zevqi-learn",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Understand the code your AI agent writes, as fast as it writes it. Claude Code hooks, quizzes, streaks and a team dashboard.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"zlearn": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=20"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc -p tsconfig.json",
|
|
19
|
+
"dev": "tsc -p tsconfig.json --watch",
|
|
20
|
+
"test": "npm run build && node --test test/unit.test.mjs test/cli.test.mjs test/e2e.test.mjs test/agent.test.mjs test/scan.test.mjs test/rename.test.mjs",
|
|
21
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
22
|
+
"prepack": "node scripts/prepack.mjs"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"claude-code",
|
|
26
|
+
"agentic-coding",
|
|
27
|
+
"ai",
|
|
28
|
+
"code-review",
|
|
29
|
+
"learning",
|
|
30
|
+
"comprehension-debt",
|
|
31
|
+
"developer-tools",
|
|
32
|
+
"cli"
|
|
33
|
+
],
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^22.0.0",
|
|
37
|
+
"typescript": "^5.6.0"
|
|
38
|
+
},
|
|
39
|
+
"author": "Neha Singh <hello@zevqi.com>",
|
|
40
|
+
"homepage": "https://zevqi.com",
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "git+https://github.com/zevqi/zlearn.git",
|
|
44
|
+
"directory": "packages/cli"
|
|
45
|
+
},
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/zevqi/zlearn/issues"
|
|
48
|
+
}
|
|
49
|
+
}
|