@looplia/looplia-cli 0.7.0 → 0.7.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/dist/chunk-2TWYHMFD.js +1148 -0
- package/dist/chunk-5WPEFJ5J.js +42 -0
- package/dist/chunk-APZNHRV3.js +7 -0
- package/dist/{chunk-GN6D7YWI.js → chunk-DN3RSIIJ.js} +139 -124
- package/dist/{chunk-APETX7TD.js → chunk-HSZZVXV5.js} +2298 -8048
- package/dist/chunk-NUQVUYOZ.js +379 -0
- package/dist/{chunk-FCL2HRTX.js → chunk-VRBGWKZ6.js} +9 -19
- package/dist/chunk-Y55L47HC.js +61 -0
- package/dist/claude-agent-sdk-BKJ5OHH6.js +68 -0
- package/dist/cli.js +33319 -1750
- package/dist/{compiler-J4DARL4X-2TXNVYEY.js → compiler-4VFX7JAN-K3XYU5VB.js} +11 -3
- package/dist/devtools-MCPGSUKV.js +3713 -0
- package/dist/{dist-2ZDF6EID.js → dist-5SEP7KKQ.js} +16 -10
- package/dist/sandbox-HAMJNBZ6.js +16 -0
- package/dist/sync-MXQ4NJWI-KGAZYCPW.js +17 -0
- package/package.json +1 -1
- package/plugins/looplia-core/skills/registry-loader/SKILL.md +1 -1
- package/plugins/looplia-core/skills/search/SKILL.md +1 -1
- package/plugins/looplia-core/skills/skill-capability-matcher/SKILL.md +1 -1
- package/plugins/looplia-core/skills/workflow-schema-composer/SKILL.md +1 -1
- package/dist/chunk-IVTVHH75.js +0 -523
- package/dist/skill-installer-GJYXIKXE-VS4MWW3V.js +0 -18
- package/plugins/looplia-core/skills/plugin-registry-scanner/SKILL.md +0 -108
- package/plugins/looplia-core/skills/plugin-registry-scanner/scripts/scan-plugins.ts +0 -221
- package/plugins/looplia-core/skills/plugin-registry-scanner/test/scan-plugins.test.ts +0 -260
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
import {
|
|
3
|
+
FRONTMATTER_REGEX,
|
|
4
|
+
PROTOCOL_REGEX,
|
|
5
|
+
TRAILING_SLASH_REGEX,
|
|
6
|
+
createProgress,
|
|
7
|
+
loadSources
|
|
8
|
+
} from "./chunk-DN3RSIIJ.js";
|
|
9
|
+
import {
|
|
10
|
+
isValidGitUrl,
|
|
11
|
+
isValidPathSegment,
|
|
12
|
+
pathExists
|
|
13
|
+
} from "./chunk-VRBGWKZ6.js";
|
|
14
|
+
import {
|
|
15
|
+
init_esm_shims
|
|
16
|
+
} from "./chunk-Y55L47HC.js";
|
|
17
|
+
|
|
18
|
+
// ../../packages/provider/dist/chunk-CB45NMLW.js
|
|
19
|
+
init_esm_shims();
|
|
20
|
+
import { exec } from "child_process";
|
|
21
|
+
import { cp, mkdir, readdir, readFile, rm, writeFile } from "fs/promises";
|
|
22
|
+
import { homedir, tmpdir } from "os";
|
|
23
|
+
import { basename, join } from "path";
|
|
24
|
+
import { promisify } from "util";
|
|
25
|
+
var execAsync = promisify(exec);
|
|
26
|
+
var MAX_SKILL_SEARCH_DEPTH = 5;
|
|
27
|
+
function getLoopliaHome() {
|
|
28
|
+
return process.env.LOOPLIA_HOME ?? join(homedir(), ".looplia");
|
|
29
|
+
}
|
|
30
|
+
function getPluginsDir() {
|
|
31
|
+
return join(getLoopliaHome(), "plugins");
|
|
32
|
+
}
|
|
33
|
+
async function findSkillMdPath(repoPath) {
|
|
34
|
+
async function searchDir(dirPath, depth, maxDepth) {
|
|
35
|
+
if (depth > maxDepth) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
const entries = await readdir(dirPath, { withFileTypes: true }).catch(
|
|
39
|
+
() => []
|
|
40
|
+
);
|
|
41
|
+
const hasSkillMd = entries.some((e) => e.isFile() && e.name === "SKILL.md");
|
|
42
|
+
if (hasSkillMd) {
|
|
43
|
+
return dirPath;
|
|
44
|
+
}
|
|
45
|
+
const subdirs = entries.filter(
|
|
46
|
+
(e) => e.isDirectory() && !e.name.startsWith(".") && e.name !== "node_modules"
|
|
47
|
+
);
|
|
48
|
+
for (const subdir of subdirs) {
|
|
49
|
+
const found = await searchDir(
|
|
50
|
+
join(dirPath, subdir.name),
|
|
51
|
+
depth + 1,
|
|
52
|
+
maxDepth
|
|
53
|
+
);
|
|
54
|
+
if (found) {
|
|
55
|
+
return found;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return await searchDir(repoPath, 0, MAX_SKILL_SEARCH_DEPTH);
|
|
61
|
+
}
|
|
62
|
+
async function extractSkillName(skillMdDir) {
|
|
63
|
+
try {
|
|
64
|
+
const content = await readFile(join(skillMdDir, "SKILL.md"), "utf-8");
|
|
65
|
+
const match = content.match(FRONTMATTER_REGEX);
|
|
66
|
+
if (match?.[1]) {
|
|
67
|
+
const lines = match[1].split("\n");
|
|
68
|
+
for (const line of lines) {
|
|
69
|
+
const colonIndex = line.indexOf(":");
|
|
70
|
+
if (colonIndex > 0) {
|
|
71
|
+
const key = line.slice(0, colonIndex).trim();
|
|
72
|
+
const value = line.slice(colonIndex + 1).trim();
|
|
73
|
+
if (key === "name" && value) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
} catch {
|
|
80
|
+
}
|
|
81
|
+
return basename(skillMdDir);
|
|
82
|
+
}
|
|
83
|
+
async function isValidPluginStructure(repoPath) {
|
|
84
|
+
const claudePluginDir = join(repoPath, ".claude-plugin");
|
|
85
|
+
const pluginJsonPath = join(claudePluginDir, "plugin.json");
|
|
86
|
+
const marketplaceJsonPath = join(claudePluginDir, "marketplace.json");
|
|
87
|
+
return await pathExists(pluginJsonPath) || await pathExists(marketplaceJsonPath);
|
|
88
|
+
}
|
|
89
|
+
async function hasMarketplaceJson(repoPath) {
|
|
90
|
+
return await pathExists(join(repoPath, ".claude-plugin", "marketplace.json"));
|
|
91
|
+
}
|
|
92
|
+
async function createPluginStructure(opts) {
|
|
93
|
+
const { pluginDir, plugin, marketplace } = opts;
|
|
94
|
+
await mkdir(join(pluginDir, ".claude-plugin"), { recursive: true });
|
|
95
|
+
await mkdir(join(pluginDir, "skills"), { recursive: true });
|
|
96
|
+
const pluginJson = {
|
|
97
|
+
name: plugin.name,
|
|
98
|
+
description: plugin.description,
|
|
99
|
+
source: { marketplace: marketplace.name, url: marketplace.url }
|
|
100
|
+
};
|
|
101
|
+
await writeFile(
|
|
102
|
+
join(pluginDir, ".claude-plugin", "plugin.json"),
|
|
103
|
+
JSON.stringify(pluginJson, null, 2)
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
async function copyPluginSkills(plugin, tempDir, pluginDir) {
|
|
107
|
+
if (plugin.skills?.length) {
|
|
108
|
+
for (const skillPath of plugin.skills) {
|
|
109
|
+
const skillName = basename(skillPath);
|
|
110
|
+
const srcPath = join(tempDir, skillPath);
|
|
111
|
+
const destPath = join(pluginDir, "skills", skillName);
|
|
112
|
+
if (await pathExists(srcPath)) {
|
|
113
|
+
await cp(srcPath, destPath, { recursive: true });
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
const srcPath = join(tempDir, plugin.source);
|
|
118
|
+
const destPath = join(pluginDir, "skills", plugin.name);
|
|
119
|
+
if (await pathExists(srcPath)) {
|
|
120
|
+
await cp(srcPath, destPath, { recursive: true });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async function wrapSkillAsPlugin(skillPath, skillName, targetPath, originalUrl) {
|
|
125
|
+
if (!isValidPathSegment(skillName)) {
|
|
126
|
+
throw new Error(
|
|
127
|
+
`Invalid skill name: "${skillName}" - contains path traversal characters`
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
await mkdir(join(targetPath, ".claude-plugin"), { recursive: true });
|
|
131
|
+
const skillTargetDir = join(targetPath, "skills", skillName);
|
|
132
|
+
await mkdir(skillTargetDir, { recursive: true });
|
|
133
|
+
await cp(skillPath, skillTargetDir, { recursive: true });
|
|
134
|
+
const pluginJson = {
|
|
135
|
+
name: skillName,
|
|
136
|
+
version: "1.0.0",
|
|
137
|
+
description: `Auto-wrapped skill from ${originalUrl}`,
|
|
138
|
+
source: {
|
|
139
|
+
type: "auto-wrapped",
|
|
140
|
+
originalUrl,
|
|
141
|
+
wrappedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
await writeFile(
|
|
145
|
+
join(targetPath, ".claude-plugin", "plugin.json"),
|
|
146
|
+
JSON.stringify(pluginJson, null, 2)
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
async function installMarketplaceSource(tempDir, source, pluginsDir) {
|
|
150
|
+
const marketplacePath = join(tempDir, ".claude-plugin", "marketplace.json");
|
|
151
|
+
if (!await pathExists(marketplacePath)) {
|
|
152
|
+
return [];
|
|
153
|
+
}
|
|
154
|
+
const marketplaceContent = await readFile(marketplacePath, "utf-8");
|
|
155
|
+
const manifest = JSON.parse(marketplaceContent);
|
|
156
|
+
const marketplace = { name: manifest.name, url: source.url };
|
|
157
|
+
const results = [];
|
|
158
|
+
for (const plugin of manifest.plugins) {
|
|
159
|
+
const pluginDir = join(pluginsDir, plugin.name);
|
|
160
|
+
try {
|
|
161
|
+
await createPluginStructure({ pluginDir, plugin, marketplace });
|
|
162
|
+
await copyPluginSkills(plugin, tempDir, pluginDir);
|
|
163
|
+
results.push({
|
|
164
|
+
skill: plugin.name,
|
|
165
|
+
status: "installed",
|
|
166
|
+
path: pluginDir
|
|
167
|
+
});
|
|
168
|
+
} catch (error) {
|
|
169
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
170
|
+
results.push({ skill: plugin.name, status: "failed", error: message });
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return results;
|
|
174
|
+
}
|
|
175
|
+
async function installPluginSource(tempDir, source, pluginsDir) {
|
|
176
|
+
const repoName = source.url.replace(PROTOCOL_REGEX, "").replace("github.com/", "").replace(TRAILING_SLASH_REGEX, "").replace(/\//g, "-");
|
|
177
|
+
const targetPath = join(pluginsDir, repoName);
|
|
178
|
+
if (await pathExists(targetPath)) {
|
|
179
|
+
return {
|
|
180
|
+
skill: repoName,
|
|
181
|
+
status: "already_installed",
|
|
182
|
+
path: targetPath
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
await cp(tempDir, targetPath, { recursive: true });
|
|
186
|
+
return {
|
|
187
|
+
skill: repoName,
|
|
188
|
+
status: "installed",
|
|
189
|
+
path: targetPath
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
async function installStandaloneSkill(_tempDir, source, pluginsDir, skillMdDir) {
|
|
193
|
+
const extractedName = await extractSkillName(skillMdDir);
|
|
194
|
+
const targetPath = join(pluginsDir, extractedName);
|
|
195
|
+
if (await pathExists(targetPath)) {
|
|
196
|
+
return {
|
|
197
|
+
skill: extractedName,
|
|
198
|
+
status: "already_installed",
|
|
199
|
+
path: targetPath
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
await wrapSkillAsPlugin(skillMdDir, extractedName, targetPath, source.url);
|
|
203
|
+
return {
|
|
204
|
+
skill: extractedName,
|
|
205
|
+
status: "installed",
|
|
206
|
+
path: targetPath
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
async function installSkillFromPath(tempDir, source, pluginsDir, skillPath) {
|
|
210
|
+
const skillSourcePath = join(tempDir, skillPath);
|
|
211
|
+
if (!await pathExists(skillSourcePath)) {
|
|
212
|
+
return {
|
|
213
|
+
skill: skillPath,
|
|
214
|
+
status: "failed",
|
|
215
|
+
error: `Path not found in marketplace: ${skillPath}`
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
const skillMdDir = await findSkillMdPath(skillSourcePath);
|
|
219
|
+
if (!skillMdDir) {
|
|
220
|
+
return {
|
|
221
|
+
skill: skillPath,
|
|
222
|
+
status: "failed",
|
|
223
|
+
error: `No SKILL.md found at ${skillPath}`
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
const extractedName = await extractSkillName(skillMdDir);
|
|
227
|
+
const targetPath = join(pluginsDir, extractedName);
|
|
228
|
+
if (await pathExists(targetPath)) {
|
|
229
|
+
return {
|
|
230
|
+
skill: extractedName,
|
|
231
|
+
status: "already_installed",
|
|
232
|
+
path: targetPath
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
await wrapSkillAsPlugin(
|
|
236
|
+
skillMdDir,
|
|
237
|
+
extractedName,
|
|
238
|
+
targetPath,
|
|
239
|
+
`${source.url}/${skillPath}`
|
|
240
|
+
);
|
|
241
|
+
return {
|
|
242
|
+
skill: extractedName,
|
|
243
|
+
status: "installed",
|
|
244
|
+
path: targetPath
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
async function detectAndInstallSource(tempDir, source, pluginsDir, progress) {
|
|
248
|
+
if (await hasMarketplaceJson(tempDir)) {
|
|
249
|
+
progress?.start("Installing marketplace plugins");
|
|
250
|
+
const results = await installMarketplaceSource(tempDir, source, pluginsDir);
|
|
251
|
+
const installed = results.filter((r) => r.status === "installed").length;
|
|
252
|
+
progress?.succeed(`Installed ${installed} plugins from ${source.id}`);
|
|
253
|
+
return { source, status: "synced", plugins: results };
|
|
254
|
+
}
|
|
255
|
+
if (await isValidPluginStructure(tempDir)) {
|
|
256
|
+
progress?.start("Installing plugin");
|
|
257
|
+
const result2 = await installPluginSource(tempDir, source, pluginsDir);
|
|
258
|
+
progress?.succeed(`Installed ${result2.skill}`);
|
|
259
|
+
return {
|
|
260
|
+
source,
|
|
261
|
+
status: result2.status === "installed" ? "synced" : "skipped",
|
|
262
|
+
plugins: [result2]
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
progress?.start("Analyzing structure");
|
|
266
|
+
const skillMdDir = await findSkillMdPath(tempDir);
|
|
267
|
+
if (!skillMdDir) {
|
|
268
|
+
progress?.fail("No plugin structure or SKILL.md found");
|
|
269
|
+
return {
|
|
270
|
+
source,
|
|
271
|
+
status: "failed",
|
|
272
|
+
plugins: [],
|
|
273
|
+
error: "No .claude-plugin/plugin.json or SKILL.md found in repository"
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
progress?.start("Auto-wrapping as plugin");
|
|
277
|
+
const result = await installStandaloneSkill(
|
|
278
|
+
tempDir,
|
|
279
|
+
source,
|
|
280
|
+
pluginsDir,
|
|
281
|
+
skillMdDir
|
|
282
|
+
);
|
|
283
|
+
progress?.succeed(`Installed ${result.skill} (auto-wrapped)`);
|
|
284
|
+
return {
|
|
285
|
+
source,
|
|
286
|
+
status: result.status === "installed" ? "synced" : "skipped",
|
|
287
|
+
plugins: [result]
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
async function syncSource(source, options) {
|
|
291
|
+
const {
|
|
292
|
+
showProgress = false,
|
|
293
|
+
force: _force = false,
|
|
294
|
+
skillPath
|
|
295
|
+
} = options ?? {};
|
|
296
|
+
const progress = showProgress ? createProgress() : null;
|
|
297
|
+
const pluginsDir = getPluginsDir();
|
|
298
|
+
await mkdir(pluginsDir, { recursive: true });
|
|
299
|
+
if (!isValidGitUrl(source.url)) {
|
|
300
|
+
return {
|
|
301
|
+
source,
|
|
302
|
+
status: "failed",
|
|
303
|
+
plugins: [],
|
|
304
|
+
error: `Invalid or untrusted git URL: ${source.url}`
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
const safeSourceId = source.id.replace(/[^a-zA-Z0-9-]/g, "-");
|
|
308
|
+
const tempDir = join(tmpdir(), `looplia-sync-${safeSourceId}-${Date.now()}`);
|
|
309
|
+
try {
|
|
310
|
+
progress?.start(`Cloning ${source.id}`);
|
|
311
|
+
await execAsync(`git clone --depth 1 "${source.url}" "${tempDir}"`);
|
|
312
|
+
progress?.succeed(`Cloned ${source.id}`);
|
|
313
|
+
if (skillPath) {
|
|
314
|
+
progress?.start(`Installing skill: ${skillPath}`);
|
|
315
|
+
const result = await installSkillFromPath(
|
|
316
|
+
tempDir,
|
|
317
|
+
source,
|
|
318
|
+
pluginsDir,
|
|
319
|
+
skillPath
|
|
320
|
+
);
|
|
321
|
+
progress?.succeed(`Installed ${result.skill}`);
|
|
322
|
+
return {
|
|
323
|
+
source,
|
|
324
|
+
status: result.status === "installed" ? "synced" : "skipped",
|
|
325
|
+
plugins: [result]
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
return await detectAndInstallSource(tempDir, source, pluginsDir, progress);
|
|
329
|
+
} catch (error) {
|
|
330
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
331
|
+
progress?.fail(`Failed to sync ${source.id}`);
|
|
332
|
+
return {
|
|
333
|
+
source,
|
|
334
|
+
status: "failed",
|
|
335
|
+
plugins: [],
|
|
336
|
+
error: message
|
|
337
|
+
};
|
|
338
|
+
} finally {
|
|
339
|
+
await rm(tempDir, { recursive: true, force: true }).catch(() => {
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
async function syncRegistrySources(options) {
|
|
344
|
+
const { showProgress = false, sourcesToSync, force = false } = options ?? {};
|
|
345
|
+
const progress = showProgress ? createProgress() : null;
|
|
346
|
+
const allSources = await loadSources();
|
|
347
|
+
const sources = allSources.filter((s) => {
|
|
348
|
+
if (!s.enabled) {
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
351
|
+
if (sourcesToSync && !sourcesToSync.includes(s.id)) {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
return true;
|
|
355
|
+
});
|
|
356
|
+
if (sources.length === 0) {
|
|
357
|
+
progress?.succeed("No sources to sync");
|
|
358
|
+
return [];
|
|
359
|
+
}
|
|
360
|
+
progress?.start(`Syncing ${sources.length} sources`);
|
|
361
|
+
const results = await Promise.all(
|
|
362
|
+
sources.map((source) => syncSource(source, { showProgress: false, force }))
|
|
363
|
+
);
|
|
364
|
+
const successCount = results.filter((r) => r.status === "synced").length;
|
|
365
|
+
const failedCount = results.filter((r) => r.status === "failed").length;
|
|
366
|
+
if (failedCount > 0) {
|
|
367
|
+
progress?.warn(
|
|
368
|
+
`Synced ${successCount}/${sources.length} sources (${failedCount} failed)`
|
|
369
|
+
);
|
|
370
|
+
} else {
|
|
371
|
+
progress?.succeed(`Synced ${successCount} sources`);
|
|
372
|
+
}
|
|
373
|
+
return results;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export {
|
|
377
|
+
syncSource,
|
|
378
|
+
syncRegistrySources
|
|
379
|
+
};
|
|
@@ -1,27 +1,19 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
|
-
};
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-Y55L47HC.js";
|
|
7
5
|
|
|
8
|
-
// ../../
|
|
6
|
+
// ../../packages/provider/dist/chunk-MM63NAER.js
|
|
7
|
+
init_esm_shims();
|
|
9
8
|
import path from "path";
|
|
10
9
|
import { fileURLToPath } from "url";
|
|
10
|
+
import { mkdir, stat } from "fs/promises";
|
|
11
11
|
var getFilename = () => fileURLToPath(import.meta.url);
|
|
12
12
|
var getDirname = () => path.dirname(getFilename());
|
|
13
13
|
var __dirname = /* @__PURE__ */ getDirname();
|
|
14
|
-
|
|
15
|
-
// ../../packages/provider/dist/chunk-MM63NAER.js
|
|
16
|
-
import path2 from "path";
|
|
17
|
-
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
18
|
-
import { mkdir, stat } from "fs/promises";
|
|
19
|
-
var getFilename2 = () => fileURLToPath2(import.meta.url);
|
|
20
|
-
var getDirname2 = () => path2.dirname(getFilename2());
|
|
21
|
-
var __dirname2 = /* @__PURE__ */ getDirname2();
|
|
22
|
-
async function pathExists(path22) {
|
|
14
|
+
async function pathExists(path2) {
|
|
23
15
|
try {
|
|
24
|
-
await stat(
|
|
16
|
+
await stat(path2);
|
|
25
17
|
return true;
|
|
26
18
|
} catch {
|
|
27
19
|
return false;
|
|
@@ -55,9 +47,7 @@ function isValidPathSegment(pathSegment) {
|
|
|
55
47
|
}
|
|
56
48
|
|
|
57
49
|
export {
|
|
58
|
-
__export,
|
|
59
50
|
__dirname,
|
|
60
|
-
__dirname2,
|
|
61
51
|
pathExists,
|
|
62
52
|
isValidGitUrl,
|
|
63
53
|
isValidPathSegment
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
+
}) : x)(function(x) {
|
|
11
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
var __esm = (fn, res) => function __init() {
|
|
15
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
16
|
+
};
|
|
17
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
33
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
34
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
35
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
36
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
37
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
38
|
+
mod
|
|
39
|
+
));
|
|
40
|
+
|
|
41
|
+
// ../../node_modules/tsup/assets/esm_shims.js
|
|
42
|
+
import path from "path";
|
|
43
|
+
import { fileURLToPath } from "url";
|
|
44
|
+
var getFilename, getDirname, __dirname;
|
|
45
|
+
var init_esm_shims = __esm({
|
|
46
|
+
"../../node_modules/tsup/assets/esm_shims.js"() {
|
|
47
|
+
"use strict";
|
|
48
|
+
getFilename = () => fileURLToPath(import.meta.url);
|
|
49
|
+
getDirname = () => path.dirname(getFilename());
|
|
50
|
+
__dirname = /* @__PURE__ */ getDirname();
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
__require,
|
|
56
|
+
__commonJS,
|
|
57
|
+
__export,
|
|
58
|
+
__toESM,
|
|
59
|
+
__dirname,
|
|
60
|
+
init_esm_shims
|
|
61
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
import "./chunk-APZNHRV3.js";
|
|
3
|
+
import {
|
|
4
|
+
DEFAULT_SETTINGS,
|
|
5
|
+
PRESETS,
|
|
6
|
+
SUMMARIZE_SYSTEM_PROMPT,
|
|
7
|
+
WRITING_KIT_OUTPUT_SCHEMA,
|
|
8
|
+
applyPreset,
|
|
9
|
+
buildSummarizePrompt,
|
|
10
|
+
clearClaudeCodePathCache,
|
|
11
|
+
createClaudeAgentExecutor,
|
|
12
|
+
createQueryLogger,
|
|
13
|
+
ensureWorkspace,
|
|
14
|
+
executeAgenticQueryStreaming,
|
|
15
|
+
executeInteractiveQueryStreaming,
|
|
16
|
+
expandPath,
|
|
17
|
+
extractContentIdFromPrompt,
|
|
18
|
+
findClaudeCodePath,
|
|
19
|
+
getConfigPath,
|
|
20
|
+
getLoopliaHome,
|
|
21
|
+
getPluginPath,
|
|
22
|
+
getSettingsDisplayInfo,
|
|
23
|
+
getWorkspacePath,
|
|
24
|
+
initializeCommandEnvironment,
|
|
25
|
+
injectLoopliaSettingsEnv,
|
|
26
|
+
isClaudeCodeInstalled,
|
|
27
|
+
maskAuthToken,
|
|
28
|
+
readLoopliaSettings,
|
|
29
|
+
readUserProfile,
|
|
30
|
+
removeLoopliaSettings,
|
|
31
|
+
validateConfig,
|
|
32
|
+
writeLoopliaSettings,
|
|
33
|
+
writeUserProfile
|
|
34
|
+
} from "./chunk-HSZZVXV5.js";
|
|
35
|
+
import "./chunk-VRBGWKZ6.js";
|
|
36
|
+
import "./chunk-Y55L47HC.js";
|
|
37
|
+
export {
|
|
38
|
+
DEFAULT_SETTINGS,
|
|
39
|
+
PRESETS,
|
|
40
|
+
SUMMARIZE_SYSTEM_PROMPT,
|
|
41
|
+
WRITING_KIT_OUTPUT_SCHEMA,
|
|
42
|
+
applyPreset,
|
|
43
|
+
buildSummarizePrompt,
|
|
44
|
+
clearClaudeCodePathCache,
|
|
45
|
+
createClaudeAgentExecutor,
|
|
46
|
+
createQueryLogger,
|
|
47
|
+
ensureWorkspace,
|
|
48
|
+
executeAgenticQueryStreaming,
|
|
49
|
+
executeInteractiveQueryStreaming,
|
|
50
|
+
expandPath,
|
|
51
|
+
extractContentIdFromPrompt,
|
|
52
|
+
findClaudeCodePath,
|
|
53
|
+
getConfigPath,
|
|
54
|
+
getLoopliaHome,
|
|
55
|
+
getPluginPath,
|
|
56
|
+
getSettingsDisplayInfo,
|
|
57
|
+
getWorkspacePath,
|
|
58
|
+
initializeCommandEnvironment,
|
|
59
|
+
injectLoopliaSettingsEnv,
|
|
60
|
+
isClaudeCodeInstalled,
|
|
61
|
+
maskAuthToken,
|
|
62
|
+
readLoopliaSettings,
|
|
63
|
+
readUserProfile,
|
|
64
|
+
removeLoopliaSettings,
|
|
65
|
+
validateConfig,
|
|
66
|
+
writeLoopliaSettings,
|
|
67
|
+
writeUserProfile
|
|
68
|
+
};
|