skilltally 0.0.0-stage → 1.0.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.
@@ -0,0 +1,129 @@
1
+ import { existsSync, readdirSync, readFileSync } from 'node:fs';
2
+ import { homedir } from 'node:os';
3
+ import { basename, join } from 'node:path';
4
+ import { detectSkillCalls } from '../core/detect.mjs';
5
+
6
+ const TARGET_TOOLS = new Set(['Skill', 'Read', 'View', 'Bash']);
7
+
8
+ function walkJsonlFiles(dir, out = []) {
9
+ if (!existsSync(dir)) return out;
10
+ let entries;
11
+ try {
12
+ entries = readdirSync(dir, { withFileTypes: true });
13
+ } catch {
14
+ return out;
15
+ }
16
+ for (const e of entries) {
17
+ if (e.name.startsWith('.')) continue;
18
+ const full = join(dir, e.name);
19
+ if (e.isDirectory()) {
20
+ walkJsonlFiles(full, out);
21
+ } else if (e.isFile() && e.name.endsWith('.jsonl')) {
22
+ out.push(full);
23
+ }
24
+ }
25
+ return out;
26
+ }
27
+
28
+ export function backfillClaude({ homeDir = homedir(), since = null } = {}) {
29
+ const files = walkJsonlFiles(join(homeDir, '.claude', 'projects')).sort();
30
+ const sinceMs = since instanceof Date ? since.getTime() : since ? Date.parse(since) : null;
31
+ const events = [];
32
+
33
+ for (const file of files) {
34
+ let raw;
35
+ try {
36
+ raw = readFileSync(file, 'utf8');
37
+ } catch {
38
+ continue;
39
+ }
40
+ if (!raw || (!raw.includes('"Skill"') && !raw.includes('SKILL.md'))) continue;
41
+
42
+ let sessionId = basename(file, '.jsonl');
43
+ let cwd = '';
44
+ const pendingCalls = [];
45
+ const failedIds = new Set();
46
+
47
+ for (const line of raw.split('\n')) {
48
+ if (!line) continue;
49
+ let obj;
50
+ try {
51
+ obj = JSON.parse(line);
52
+ } catch {
53
+ continue;
54
+ }
55
+
56
+ if (obj.sessionId) sessionId = obj.sessionId;
57
+ if (obj.cwd) cwd = obj.cwd;
58
+
59
+ const content = obj.message?.content;
60
+ if (!Array.isArray(content)) continue;
61
+
62
+ if (obj.type === 'user') {
63
+ for (const block of content) {
64
+ if (block?.type === 'tool_result' && block.is_error === true && block.tool_use_id) {
65
+ failedIds.add(block.tool_use_id);
66
+ }
67
+ }
68
+ continue;
69
+ }
70
+
71
+ if (obj.type !== 'assistant') continue;
72
+ const model = obj.message?.model;
73
+
74
+ for (const block of content) {
75
+ if (block?.type !== 'tool_use' || !TARGET_TOOLS.has(block.name)) continue;
76
+ pendingCalls.push({
77
+ idx: pendingCalls.length,
78
+ ts: obj.timestamp,
79
+ tool: block.name,
80
+ callId: block.id,
81
+ input: block.input && typeof block.input === 'object' ? block.input : {},
82
+ cwd,
83
+ model,
84
+ });
85
+ }
86
+ }
87
+
88
+ for (const call of pendingCalls) {
89
+ if (sinceMs !== null && call.ts) {
90
+ const tsMs = Date.parse(call.ts);
91
+ if (Number.isFinite(tsMs) && tsMs < sinceMs) continue;
92
+ }
93
+
94
+ const hits = detectSkillCalls({
95
+ tool: call.tool,
96
+ args: call.input,
97
+ cwd: call.cwd,
98
+ homeDir,
99
+ allowShell: true,
100
+ });
101
+
102
+ const ok = call.callId ? !failedIds.has(call.callId) : true;
103
+ hits.forEach((h, hitIdx) => {
104
+ events.push({
105
+ v: 1,
106
+ id: `claude:${sessionId}:${call.callId || call.idx}#${hitIdx}`,
107
+ ts: call.ts || new Date(0).toISOString(),
108
+ host: 'claude',
109
+ skill: h.skill,
110
+ ...(h.raw_skill && h.raw_skill !== h.skill ? { raw_skill: h.raw_skill } : {}),
111
+ ...(h.skill_path ? { skill_path: h.skill_path } : {}),
112
+ source: h.source || 'unknown',
113
+ via: h.via,
114
+ tool: call.tool,
115
+ session_id: sessionId,
116
+ ...(call.cwd ? { project: basename(call.cwd) } : {}),
117
+ ...(call.model ? { model: call.model } : {}),
118
+ origin: 'backfill',
119
+ ok,
120
+ });
121
+ });
122
+ }
123
+ }
124
+
125
+ return {
126
+ files: files.length,
127
+ events,
128
+ };
129
+ }
@@ -0,0 +1,200 @@
1
+ import { execFileSync } from 'node:child_process';
2
+ import { existsSync, readdirSync, readFileSync } from 'node:fs';
3
+ import { homedir } from 'node:os';
4
+ import { basename, join } from 'node:path';
5
+ import zlib from 'node:zlib';
6
+ import { detectSkillCalls } from '../core/detect.mjs';
7
+
8
+ function walkSessionFiles(dir, out = []) {
9
+ if (!existsSync(dir)) return out;
10
+ let entries;
11
+ try {
12
+ entries = readdirSync(dir, { withFileTypes: true });
13
+ } catch {
14
+ return out;
15
+ }
16
+ for (const e of entries) {
17
+ if (e.name.startsWith('.')) continue;
18
+ const full = join(dir, e.name);
19
+ if (e.isDirectory()) {
20
+ walkSessionFiles(full, out);
21
+ } else if (e.isFile() && (e.name.endsWith('.jsonl') || e.name.endsWith('.jsonl.zst'))) {
22
+ out.push(full);
23
+ }
24
+ }
25
+ return out;
26
+ }
27
+
28
+ function readSessionText(filePath) {
29
+ if (!filePath.endsWith('.zst')) {
30
+ return { text: readFileSync(filePath, 'utf8'), skippedZst: false };
31
+ }
32
+ const buf = readFileSync(filePath);
33
+ if (typeof zlib.zstdDecompressSync === 'function') {
34
+ return { text: zlib.zstdDecompressSync(buf).toString('utf8'), skippedZst: false };
35
+ }
36
+ try {
37
+ const out = execFileSync('zstd', ['-dc', filePath], {
38
+ encoding: 'utf8',
39
+ maxBuffer: 64 * 1024 * 1024,
40
+ stdio: ['ignore', 'pipe', 'ignore'],
41
+ });
42
+ return { text: out, skippedZst: false };
43
+ } catch {
44
+ return { text: null, skippedZst: true };
45
+ }
46
+ }
47
+
48
+ function isOutputError(output) {
49
+ if (!output) return false;
50
+ if (typeof output === 'object') {
51
+ if (output.is_error === true) return true;
52
+ if (typeof output.exit_code === 'number' && output.exit_code !== 0) return true;
53
+ return false;
54
+ }
55
+ const str = String(output);
56
+ if (/Process exited with code [1-9]\d*/.test(str)) return true;
57
+ if (/exit status [1-9]\d*/i.test(str)) return true;
58
+ if (/No such file or directory/i.test(str)) return true;
59
+ return false;
60
+ }
61
+
62
+ function sessionIdFromFilename(filePath) {
63
+ const m = basename(filePath).match(/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i);
64
+ return m ? m[1] : basename(filePath);
65
+ }
66
+
67
+ export function backfillCodex({ homeDir = homedir(), since = null } = {}) {
68
+ const files = [
69
+ ...walkSessionFiles(join(homeDir, '.codex', 'sessions')),
70
+ ...walkSessionFiles(join(homeDir, '.codex', 'archived_sessions')),
71
+ ].sort();
72
+
73
+ const sinceMs = since instanceof Date ? since.getTime() : since ? Date.parse(since) : null;
74
+ const events = [];
75
+ let skippedZst = 0;
76
+
77
+ for (const file of files) {
78
+ let readRes;
79
+ try {
80
+ readRes = readSessionText(file);
81
+ } catch {
82
+ continue;
83
+ }
84
+ if (readRes.skippedZst) {
85
+ skippedZst += 1;
86
+ continue;
87
+ }
88
+ const raw = readRes.text;
89
+ if (!raw || !raw.includes('SKILL.md')) continue;
90
+
91
+ let sessionId = sessionIdFromFilename(file);
92
+ let cwd = '';
93
+ let model = undefined;
94
+
95
+ const pendingCalls = [];
96
+ const failedCalls = new Set();
97
+
98
+ for (const line of raw.split('\n')) {
99
+ if (!line) continue;
100
+ let obj;
101
+ try {
102
+ obj = JSON.parse(line);
103
+ } catch {
104
+ continue;
105
+ }
106
+
107
+ if (obj.type === 'session_meta' && obj.payload) {
108
+ if (obj.payload.id || obj.payload.session_id) {
109
+ sessionId = obj.payload.id || obj.payload.session_id;
110
+ }
111
+ if (obj.payload.cwd) cwd = obj.payload.cwd;
112
+ continue;
113
+ }
114
+
115
+ if (obj.type === 'turn_context' && obj.payload) {
116
+ if (obj.payload.cwd) cwd = obj.payload.cwd;
117
+ if (obj.payload.model) model = obj.payload.model;
118
+ continue;
119
+ }
120
+
121
+ if (obj.type !== 'response_item' || !obj.payload) continue;
122
+ const p = obj.payload;
123
+
124
+ if (p.type === 'function_call_output' || p.type === 'custom_tool_call_output') {
125
+ if (p.call_id && isOutputError(p.output)) {
126
+ failedCalls.add(p.call_id);
127
+ }
128
+ continue;
129
+ }
130
+
131
+ if (p.type !== 'function_call' && p.type !== 'custom_tool_call') continue;
132
+
133
+ const textToScan = p.type === 'function_call' ? p.arguments : p.input;
134
+ if (typeof textToScan !== 'string' || !textToScan.includes('SKILL.md')) continue;
135
+
136
+ let argsObj = {};
137
+ if (p.type === 'function_call') {
138
+ try {
139
+ const parsed = JSON.parse(textToScan);
140
+ argsObj = parsed && typeof parsed === 'object' ? parsed : { cmd: textToScan };
141
+ } catch {
142
+ argsObj = { cmd: textToScan };
143
+ }
144
+ } else {
145
+ argsObj = { input: textToScan };
146
+ }
147
+
148
+ pendingCalls.push({
149
+ idx: pendingCalls.length,
150
+ ts: obj.timestamp,
151
+ tool: p.name,
152
+ callId: p.call_id,
153
+ args: argsObj,
154
+ cwd,
155
+ model,
156
+ });
157
+ }
158
+
159
+ for (const call of pendingCalls) {
160
+ if (sinceMs !== null && call.ts) {
161
+ const tsMs = Date.parse(call.ts);
162
+ if (Number.isFinite(tsMs) && tsMs < sinceMs) continue;
163
+ }
164
+
165
+ const hits = detectSkillCalls({
166
+ tool: call.tool,
167
+ args: call.args,
168
+ cwd: call.cwd,
169
+ homeDir,
170
+ allowShell: true,
171
+ });
172
+
173
+ const ok = call.callId ? !failedCalls.has(call.callId) : true;
174
+ hits.forEach((h, hitIdx) => {
175
+ events.push({
176
+ v: 1,
177
+ id: `codex:${sessionId}:${call.callId || call.idx}#${hitIdx}`,
178
+ ts: call.ts || new Date(0).toISOString(),
179
+ host: 'codex',
180
+ skill: h.skill,
181
+ ...(h.skill_path ? { skill_path: h.skill_path } : {}),
182
+ source: h.source,
183
+ via: h.via,
184
+ ...(call.tool ? { tool: call.tool } : {}),
185
+ session_id: sessionId,
186
+ ...(call.cwd ? { project: basename(call.cwd) } : {}),
187
+ ...(call.model ? { model: call.model } : {}),
188
+ origin: 'backfill',
189
+ ok,
190
+ });
191
+ });
192
+ }
193
+ }
194
+
195
+ return {
196
+ files: files.length,
197
+ skippedZst,
198
+ events,
199
+ };
200
+ }
@@ -0,0 +1,152 @@
1
+ import { existsSync, readdirSync, readFileSync } from 'node:fs';
2
+ import { homedir } from 'node:os';
3
+ import { basename, join } from 'node:path';
4
+ import { detectSkillCalls } from '../core/detect.mjs';
5
+
6
+ const TARGET_TOOLS = new Set(['activate_skill', 'read_file', 'view_file', 'run_shell_command']);
7
+
8
+ function findGeminiChatFiles(homeDir) {
9
+ const tmpRoot = join(homeDir, '.gemini', 'tmp');
10
+ if (!existsSync(tmpRoot)) return [];
11
+ const files = [];
12
+ let projDirs;
13
+ try {
14
+ projDirs = readdirSync(tmpRoot, { withFileTypes: true });
15
+ } catch {
16
+ return files;
17
+ }
18
+ for (const proj of projDirs) {
19
+ if (!proj.isDirectory() && !proj.isSymbolicLink()) continue;
20
+ const chatsDir = join(tmpRoot, proj.name, 'chats');
21
+ if (!existsSync(chatsDir)) continue;
22
+ let chatEntries;
23
+ try {
24
+ chatEntries = readdirSync(chatsDir, { withFileTypes: true });
25
+ } catch {
26
+ continue;
27
+ }
28
+ for (const f of chatEntries) {
29
+ if (f.isFile() && (f.name.endsWith('.json') || f.name.endsWith('.jsonl'))) {
30
+ files.push(join(chatsDir, f.name));
31
+ }
32
+ }
33
+ }
34
+ return files.sort();
35
+ }
36
+
37
+ function parseChatFile(filePath, raw) {
38
+ if (filePath.endsWith('.jsonl')) {
39
+ const messages = [];
40
+ let sessionId = basename(filePath, '.jsonl');
41
+ let startTime = null;
42
+ let cwd = '';
43
+ for (const line of raw.split('\n')) {
44
+ if (!line.trim()) continue;
45
+ try {
46
+ const obj = JSON.parse(line);
47
+ if (obj.sessionId) sessionId = obj.sessionId;
48
+ if (!startTime && obj.timestamp) startTime = obj.timestamp;
49
+ if (!cwd && obj.cwd) cwd = obj.cwd;
50
+ messages.push(obj);
51
+ } catch {}
52
+ }
53
+ return { sessionId, startTime, cwd, messages };
54
+ }
55
+
56
+ let parsed;
57
+ try {
58
+ parsed = JSON.parse(raw);
59
+ } catch {
60
+ return { sessionId: basename(filePath, '.json'), startTime: null, cwd: '', messages: [] };
61
+ }
62
+
63
+ if (Array.isArray(parsed)) {
64
+ return {
65
+ sessionId: basename(filePath, '.json'),
66
+ startTime: parsed[0]?.timestamp || null,
67
+ cwd: '',
68
+ messages: parsed,
69
+ };
70
+ }
71
+
72
+ return {
73
+ sessionId: parsed?.sessionId || basename(filePath, '.json'),
74
+ startTime: parsed?.startTime || null,
75
+ cwd: parsed?.cwd || '',
76
+ messages: Array.isArray(parsed?.messages) ? parsed.messages : [],
77
+ };
78
+ }
79
+
80
+ export function backfillGemini({ homeDir = homedir(), since = null } = {}) {
81
+ const files = findGeminiChatFiles(homeDir);
82
+ const sinceMs = since instanceof Date ? since.getTime() : since ? Date.parse(since) : null;
83
+ const events = [];
84
+
85
+ for (const file of files) {
86
+ let raw;
87
+ try {
88
+ raw = readFileSync(file, 'utf8');
89
+ } catch {
90
+ continue;
91
+ }
92
+ if (!raw || (!raw.includes('"activate_skill"') && !raw.includes('SKILL.md'))) continue;
93
+
94
+ const { sessionId, startTime, cwd: fileCwd, messages } = parseChatFile(file, raw);
95
+ let callIdx = 0;
96
+
97
+ for (const msg of messages) {
98
+ if (!msg || typeof msg !== 'object') continue;
99
+ const toolCalls = Array.isArray(msg.toolCalls)
100
+ ? msg.toolCalls
101
+ : Array.isArray(msg.tool_calls)
102
+ ? msg.tool_calls
103
+ : [];
104
+ if (toolCalls.length === 0) continue;
105
+
106
+ const msgCwd = msg.cwd || fileCwd || '';
107
+ for (const tc of toolCalls) {
108
+ if (!tc || !TARGET_TOOLS.has(tc.name)) continue;
109
+ const idx = callIdx++;
110
+ const ts = tc.timestamp || msg.timestamp || startTime;
111
+ if (sinceMs !== null && ts) {
112
+ const tsMs = Date.parse(ts);
113
+ if (Number.isFinite(tsMs) && tsMs < sinceMs) continue;
114
+ }
115
+
116
+ const args = tc.args ?? tc.input ?? {};
117
+ const hits = detectSkillCalls({
118
+ tool: tc.name,
119
+ args: typeof args === 'object' && args !== null ? args : {},
120
+ cwd: msgCwd,
121
+ homeDir,
122
+ allowShell: true,
123
+ });
124
+
125
+ const ok = tc.status !== 'error' && tc.status !== 'cancelled';
126
+ hits.forEach((h, hitIdx) => {
127
+ events.push({
128
+ v: 1,
129
+ id: `gemini:${sessionId}:${tc.id || idx}#${hitIdx}`,
130
+ ts: ts || new Date(0).toISOString(),
131
+ host: 'gemini',
132
+ skill: h.skill,
133
+ ...(h.skill_path ? { skill_path: h.skill_path } : {}),
134
+ source: h.source || 'unknown',
135
+ via: h.via,
136
+ tool: tc.name,
137
+ session_id: sessionId,
138
+ ...(msgCwd ? { project: basename(msgCwd) } : {}),
139
+ ...(msg.model ? { model: msg.model } : {}),
140
+ origin: 'backfill',
141
+ ok,
142
+ });
143
+ });
144
+ }
145
+ }
146
+ }
147
+
148
+ return {
149
+ files: files.length,
150
+ events,
151
+ };
152
+ }
@@ -0,0 +1,83 @@
1
+ import { homedir } from 'node:os';
2
+ import { getHomeDir } from '../core/config.mjs';
3
+ import { dedupeEvents } from '../core/normalize.mjs';
4
+ import { writeBackfillEvents } from '../core/store.mjs';
5
+ import { backfillAntigravity } from './antigravity.mjs';
6
+ import { backfillClaude } from './claude.mjs';
7
+ import { backfillCodex } from './codex.mjs';
8
+ import { backfillGemini } from './gemini.mjs';
9
+
10
+ export function runBackfill({
11
+ homeDir = homedir(),
12
+ dataHome = getHomeDir(),
13
+ host = 'all',
14
+ since = null,
15
+ dryRun = false,
16
+ } = {}) {
17
+ const hostsSummary = {};
18
+ const collected = [];
19
+
20
+ const wantAgy = host === 'all' || String(host).startsWith('antigravity');
21
+ const wantCodex = host === 'all' || host === 'codex';
22
+ const wantClaude = host === 'all' || host === 'claude';
23
+ const wantGemini = host === 'all' || host === 'gemini';
24
+
25
+ if (wantAgy) {
26
+ const res = backfillAntigravity({ homeDir, since });
27
+ const filtered =
28
+ host === 'all' || host === 'antigravity'
29
+ ? res.events
30
+ : res.events.filter((e) => e.host === host);
31
+ collected.push(...filtered);
32
+ hostsSummary.antigravity = {
33
+ files: res.files,
34
+ events: filtered.length,
35
+ uniqueSkills: new Set(filtered.map((e) => e.skill)).size,
36
+ };
37
+ }
38
+
39
+ if (wantCodex) {
40
+ const res = backfillCodex({ homeDir, since });
41
+ collected.push(...res.events);
42
+ hostsSummary.codex = {
43
+ files: res.files,
44
+ events: res.events.length,
45
+ uniqueSkills: new Set(res.events.map((e) => e.skill)).size,
46
+ skippedZst: res.skippedZst,
47
+ };
48
+ }
49
+
50
+ if (wantClaude) {
51
+ const res = backfillClaude({ homeDir, since });
52
+ collected.push(...res.events);
53
+ hostsSummary.claude = {
54
+ files: res.files,
55
+ events: res.events.length,
56
+ uniqueSkills: new Set(res.events.map((e) => e.skill)).size,
57
+ };
58
+ }
59
+
60
+ if (wantGemini) {
61
+ const res = backfillGemini({ homeDir, since });
62
+ collected.push(...res.events);
63
+ hostsSummary.gemini = {
64
+ files: res.files,
65
+ events: res.events.length,
66
+ uniqueSkills: new Set(res.events.map((e) => e.skill)).size,
67
+ };
68
+ }
69
+
70
+ const events = dedupeEvents(collected);
71
+ let outputPath = null;
72
+ if (!dryRun) {
73
+ outputPath = writeBackfillEvents(dataHome, events);
74
+ }
75
+
76
+ return {
77
+ totalEvents: events.length,
78
+ uniqueSkills: new Set(events.map((e) => e.skill)).size,
79
+ dryRun,
80
+ outputPath,
81
+ hosts: hostsSummary,
82
+ };
83
+ }
@@ -0,0 +1,33 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { homedir } from 'node:os';
3
+ import { join } from 'node:path';
4
+
5
+ export const DEFAULT_CONFIG = Object.freeze({
6
+ exclude_skills: [],
7
+ exclude_sources: [],
8
+ aliases: {},
9
+ store_cwd: false,
10
+ });
11
+
12
+ export function getHomeDir(env = process.env) {
13
+ return env.SKILLTALLY_HOME || join(homedir(), '.skilltally');
14
+ }
15
+
16
+ export function loadConfig(homeDir = getHomeDir()) {
17
+ try {
18
+ const raw = readFileSync(join(homeDir, 'config.json'), 'utf8');
19
+ const parsed = JSON.parse(raw);
20
+ if (!parsed || typeof parsed !== 'object') return { ...DEFAULT_CONFIG };
21
+ return {
22
+ exclude_skills: Array.isArray(parsed.exclude_skills) ? parsed.exclude_skills.map(String) : [],
23
+ exclude_sources: Array.isArray(parsed.exclude_sources) ? parsed.exclude_sources.map(String) : [],
24
+ aliases:
25
+ parsed.aliases && typeof parsed.aliases === 'object' && !Array.isArray(parsed.aliases)
26
+ ? { ...parsed.aliases }
27
+ : {},
28
+ store_cwd: parsed.store_cwd === true,
29
+ };
30
+ } catch {
31
+ return { ...DEFAULT_CONFIG };
32
+ }
33
+ }
@@ -0,0 +1,58 @@
1
+ import { existsSync, mkdirSync, readFileSync, rmSync, statSync, writeFileSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+
4
+ export function getDebugStatus(dataHome) {
5
+ const markerPath = join(dataHome, '.debug');
6
+ const logPath = join(dataHome, 'debug.jsonl');
7
+ const enabled = existsSync(markerPath);
8
+ const logExists = existsSync(logPath);
9
+
10
+ let logBytes = 0;
11
+ let logLines = 0;
12
+ if (logExists) {
13
+ try {
14
+ logBytes = statSync(logPath).size;
15
+ const raw = readFileSync(logPath, 'utf8');
16
+ for (const line of raw.split('\n')) {
17
+ if (line.trim()) logLines += 1;
18
+ }
19
+ } catch {}
20
+ }
21
+
22
+ return {
23
+ enabled,
24
+ markerPath,
25
+ logPath,
26
+ logExists,
27
+ logBytes,
28
+ logLines,
29
+ };
30
+ }
31
+
32
+ export function setDebugMode(dataHome, enabled) {
33
+ const markerPath = join(dataHome, '.debug');
34
+ const logPath = join(dataHome, 'debug.jsonl');
35
+ let deletedLog = false;
36
+
37
+ if (enabled) {
38
+ mkdirSync(dataHome, { recursive: true, mode: 0o700 });
39
+ writeFileSync(
40
+ markerPath,
41
+ JSON.stringify({ enabledAt: new Date().toISOString() }) + '\n',
42
+ { mode: 0o600 }
43
+ );
44
+ } else {
45
+ if (existsSync(markerPath)) {
46
+ rmSync(markerPath, { force: true });
47
+ }
48
+ if (existsSync(logPath)) {
49
+ rmSync(logPath, { force: true });
50
+ deletedLog = true;
51
+ }
52
+ }
53
+
54
+ return {
55
+ ...getDebugStatus(dataHome),
56
+ deletedLog,
57
+ };
58
+ }
@@ -0,0 +1,9 @@
1
+ export {
2
+ SKILL_NAME_RE,
3
+ SKILL_PATH_RE,
4
+ detectSkillCalls,
5
+ normalizeHookPayload,
6
+ resolveHost,
7
+ resolveSource,
8
+ unwrapArg,
9
+ } from '../../bin/track.mjs';