@looplia/looplia-cli 0.7.1 → 0.7.2

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.
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  compileRegistry,
4
4
  getCompiledRegistryPath
5
- } from "./chunk-DN3RSIIJ.js";
5
+ } from "./chunk-XTUQVJYH.js";
6
6
  import {
7
7
  BRAND,
8
8
  DIRTY,
@@ -107,7 +107,7 @@ import {
107
107
  unknownType,
108
108
  util,
109
109
  voidType
110
- } from "./chunk-HSZZVXV5.js";
110
+ } from "./chunk-OIE7CSW6.js";
111
111
  import {
112
112
  pathExists
113
113
  } from "./chunk-VRBGWKZ6.js";
@@ -904,7 +904,7 @@ async function installThirdPartySkill(skill, showProgress = false) {
904
904
  priority: 0,
905
905
  addedAt: (/* @__PURE__ */ new Date()).toISOString()
906
906
  };
907
- const { syncSource: sync } = await import("./sync-MXQ4NJWI-KGAZYCPW.js");
907
+ const { syncSource: sync } = await import("./sync-MFM46YAB-SSBMNJ7D.js");
908
908
  const result = await sync(source, {
909
909
  showProgress,
910
910
  skillPath: skill.skillPath
@@ -1036,7 +1036,7 @@ async function installSkillFromUrl(url, showProgress = false) {
1036
1036
  priority: 0,
1037
1037
  addedAt: (/* @__PURE__ */ new Date()).toISOString()
1038
1038
  };
1039
- const { syncSource: sync } = await import("./sync-MXQ4NJWI-KGAZYCPW.js");
1039
+ const { syncSource: sync } = await import("./sync-MFM46YAB-SSBMNJ7D.js");
1040
1040
  const result = await sync(source, {
1041
1041
  showProgress,
1042
1042
  skillPath
@@ -5,7 +5,7 @@ import {
5
5
  TRAILING_SLASH_REGEX,
6
6
  createProgress,
7
7
  loadSources
8
- } from "./chunk-DN3RSIIJ.js";
8
+ } from "./chunk-XTUQVJYH.js";
9
9
  import {
10
10
  isValidGitUrl,
11
11
  isValidPathSegment,
@@ -15,7 +15,7 @@ import {
15
15
  init_esm_shims
16
16
  } from "./chunk-Y55L47HC.js";
17
17
 
18
- // ../../packages/provider/dist/chunk-CB45NMLW.js
18
+ // ../../packages/provider/dist/chunk-3D6TVN6A.js
19
19
  init_esm_shims();
20
20
  import { exec } from "child_process";
21
21
  import { cp, mkdir, readdir, readFile, rm, writeFile } from "fs/promises";
@@ -7,7 +7,7 @@ import {
7
7
  init_esm_shims
8
8
  } from "./chunk-Y55L47HC.js";
9
9
 
10
- // ../../packages/provider/dist/chunk-V4SRZ42U.js
10
+ // ../../packages/provider/dist/chunk-Q57VKNQX.js
11
11
  init_esm_shims();
12
12
  import { createHash } from "crypto";
13
13
  import {
@@ -173,9 +173,9 @@ async function copyPlugins(targetDir, sourcePath) {
173
173
  JSON.stringify(createDefaultProfile(), null, 2),
174
174
  "utf-8"
175
175
  );
176
- const { initializeRegistry, compileRegistry } = await import("./compiler-4VFX7JAN-K3XYU5VB.js");
176
+ const { initializeRegistry, compileRegistry } = await import("./compiler-4B63UTUP-VE77VSJ2.js");
177
177
  await initializeRegistry();
178
- const { syncRegistrySources } = await import("./sync-MXQ4NJWI-KGAZYCPW.js");
178
+ const { syncRegistrySources } = await import("./sync-MFM46YAB-SSBMNJ7D.js");
179
179
  const syncResults = await syncRegistrySources({ showProgress: true });
180
180
  for (const result of syncResults) {
181
181
  if (result.status === "failed") {
@@ -293,7 +293,7 @@ async function getPluginPaths() {
293
293
  return await getProdPluginPaths();
294
294
  }
295
295
 
296
- // ../../packages/provider/dist/chunk-LPNCEPC6.js
296
+ // ../../packages/provider/dist/chunk-OG5PVVUV.js
297
297
  init_esm_shims();
298
298
  import { execSync } from "child_process";
299
299
  import { existsSync as existsSync3 } from "fs";
@@ -22127,7 +22127,7 @@ function query({
22127
22127
  return queryInstance;
22128
22128
  }
22129
22129
 
22130
- // ../../packages/provider/dist/chunk-LPNCEPC6.js
22130
+ // ../../packages/provider/dist/chunk-OG5PVVUV.js
22131
22131
  import { appendFileSync as appendFileSync3, mkdirSync as mkdirSync3, writeFileSync } from "fs";
22132
22132
  import { join as join33 } from "path";
22133
22133
  import { cp as cp2, mkdir as mkdir22, readFile as readFile22, rm as rm22, writeFile as writeFile22 } from "fs/promises";
@@ -6,8 +6,8 @@ import {
6
6
  // src/utils/sandbox.ts
7
7
  init_esm_shims();
8
8
  import { randomBytes } from "crypto";
9
- import { mkdirSync } from "fs";
10
- import { join } from "path";
9
+ import { copyFileSync, mkdirSync, readdirSync } from "fs";
10
+ import { join, resolve } from "path";
11
11
  var SANDBOX_DIRS = {
12
12
  INPUTS: "inputs",
13
13
  OUTPUTS: "outputs",
@@ -32,11 +32,43 @@ function createSandboxDirectories(workspace, sandboxId) {
32
32
  mkdirSync(join(sandboxDir, SANDBOX_DIRS.LOGS), { recursive: true });
33
33
  return sandboxDir;
34
34
  }
35
+ function copyOutputsToDestination(workspace, sandboxId, destDir) {
36
+ if (!(workspace && sandboxId && destDir)) {
37
+ return 0;
38
+ }
39
+ const outputsPath = join(
40
+ workspace,
41
+ "sandbox",
42
+ sandboxId,
43
+ SANDBOX_DIRS.OUTPUTS
44
+ );
45
+ const resolvedDest = resolve(destDir);
46
+ mkdirSync(resolvedDest, { recursive: true });
47
+ let copiedCount = 0;
48
+ try {
49
+ const entries = readdirSync(outputsPath, { withFileTypes: true });
50
+ for (const entry of entries) {
51
+ if (entry.isFile()) {
52
+ const srcPath = join(outputsPath, entry.name);
53
+ const destPath = join(resolvedDest, entry.name);
54
+ copyFileSync(srcPath, destPath);
55
+ copiedCount += 1;
56
+ }
57
+ }
58
+ } catch (error) {
59
+ const nodeError = error;
60
+ if (nodeError.code !== "ENOENT") {
61
+ console.warn(`Warning: Error copying outputs: ${error}`);
62
+ }
63
+ }
64
+ return copiedCount;
65
+ }
35
66
 
36
67
  export {
37
68
  SANDBOX_DIRS,
38
69
  generateRandomSuffix,
39
70
  generateSlug,
40
71
  generateSandboxId,
41
- createSandboxDirectories
72
+ createSandboxDirectories,
73
+ copyOutputsToDestination
42
74
  };
@@ -6,7 +6,7 @@ import {
6
6
  init_esm_shims
7
7
  } from "./chunk-Y55L47HC.js";
8
8
 
9
- // ../../packages/provider/dist/chunk-M7EZUTK7.js
9
+ // ../../packages/provider/dist/chunk-QHAUYGWN.js
10
10
  init_esm_shims();
11
11
  import { exec } from "child_process";
12
12
  import { mkdir, readdir, readFile, writeFile } from "fs/promises";
@@ -158,11 +158,6 @@ var DEFAULT_MARKETPLACE_SOURCES = [
158
158
  name: "anthropic-skills",
159
159
  url: "https://github.com/anthropics/skills",
160
160
  description: "Official Anthropic skills - xlsx, pdf, pptx, docx, frontend-design, and more"
161
- },
162
- {
163
- name: "awesome-claude-skills",
164
- url: "https://github.com/ComposioHQ/awesome-claude-skills",
165
- description: "Community-curated Claude skills collection by ComposioHQ"
166
161
  }
167
162
  ];
168
163
  function getLoopliaHome() {
@@ -31,7 +31,7 @@ import {
31
31
  validateConfig,
32
32
  writeLoopliaSettings,
33
33
  writeUserProfile
34
- } from "./chunk-HSZZVXV5.js";
34
+ } from "./chunk-OIE7CSW6.js";
35
35
  import "./chunk-VRBGWKZ6.js";
36
36
  import "./chunk-Y55L47HC.js";
37
37
  export {
package/dist/cli.js CHANGED
@@ -12,8 +12,8 @@ import {
12
12
  removeSkill,
13
13
  updateSkill,
14
14
  validateUserProfile
15
- } from "./chunk-2TWYHMFD.js";
16
- import "./chunk-NUQVUYOZ.js";
15
+ } from "./chunk-2ETB5RP7.js";
16
+ import "./chunk-HMJDIX7C.js";
17
17
  import {
18
18
  addSource,
19
19
  compileRegistry,
@@ -21,7 +21,7 @@ import {
21
21
  initializeRegistry,
22
22
  loadSources,
23
23
  removeSource
24
- } from "./chunk-DN3RSIIJ.js";
24
+ } from "./chunk-XTUQVJYH.js";
25
25
  import "./chunk-APZNHRV3.js";
26
26
  import {
27
27
  DEFAULT_SETTINGS,
@@ -42,12 +42,13 @@ import {
42
42
  removeLoopliaSettings,
43
43
  writeLoopliaSettings,
44
44
  writeUserProfile
45
- } from "./chunk-HSZZVXV5.js";
45
+ } from "./chunk-OIE7CSW6.js";
46
46
  import "./chunk-VRBGWKZ6.js";
47
47
  import {
48
+ copyOutputsToDestination,
48
49
  createSandboxDirectories,
49
50
  generateSandboxId
50
- } from "./chunk-5WPEFJ5J.js";
51
+ } from "./chunk-QLL3W74D.js";
51
52
  import {
52
53
  __commonJS,
53
54
  __dirname,
@@ -32863,10 +32864,10 @@ var ANALYSIS_RESULT_SCHEMA = {
32863
32864
  }
32864
32865
  };
32865
32866
  async function* analyzeDescriptionStreaming(description, workspace, questionCallback) {
32866
- const { createSandboxDirectories: createSandboxDirectories2, generateSandboxId: generateSandboxId2 } = await import("./sandbox-HAMJNBZ6.js");
32867
+ const { createSandboxDirectories: createSandboxDirectories2, generateSandboxId: generateSandboxId2 } = await import("./sandbox-LD3EU4YO.js");
32867
32868
  const sandboxId = generateSandboxId2("build");
32868
32869
  createSandboxDirectories2(workspace, sandboxId);
32869
- const { executeInteractiveQueryStreaming } = await import("./claude-agent-sdk-BKJ5OHH6.js");
32870
+ const { executeInteractiveQueryStreaming } = await import("./claude-agent-sdk-YGNDVP55.js");
32870
32871
  const prompt = `${buildAnalysisPrompt(description)} --sandbox-id ${sandboxId}`;
32871
32872
  const generator = executeInteractiveQueryStreaming(
32872
32873
  prompt,
@@ -34111,7 +34112,7 @@ function executeMock(args) {
34111
34112
  }
34112
34113
  async function executeBatch(prompt, workspace, executor) {
34113
34114
  console.error("\u23F3 Building workflow...");
34114
- const { createSandboxDirectories: createSandboxDirectories2, generateSandboxId: generateSandboxId2 } = await import("./sandbox-HAMJNBZ6.js");
34115
+ const { createSandboxDirectories: createSandboxDirectories2, generateSandboxId: generateSandboxId2 } = await import("./sandbox-LD3EU4YO.js");
34115
34116
  const sandboxId = generateSandboxId2("build");
34116
34117
  createSandboxDirectories2(workspace, sandboxId);
34117
34118
  const promptWithSandbox = `${prompt} --sandbox-id ${sandboxId}`;
@@ -34129,11 +34130,11 @@ async function executeBatch(prompt, workspace, executor) {
34129
34130
  };
34130
34131
  }
34131
34132
  async function* executeInteractiveStreamingBatch(prompt, workspace, questionCallback) {
34132
- const { createSandboxDirectories: createSandboxDirectories2, generateSandboxId: generateSandboxId2 } = await import("./sandbox-HAMJNBZ6.js");
34133
+ const { createSandboxDirectories: createSandboxDirectories2, generateSandboxId: generateSandboxId2 } = await import("./sandbox-LD3EU4YO.js");
34133
34134
  const sandboxId = generateSandboxId2("build");
34134
34135
  createSandboxDirectories2(workspace, sandboxId);
34135
34136
  const promptWithSandbox = `${prompt} --sandbox-id ${sandboxId}`;
34136
- const { executeInteractiveQueryStreaming } = await import("./claude-agent-sdk-BKJ5OHH6.js");
34137
+ const { executeInteractiveQueryStreaming } = await import("./claude-agent-sdk-YGNDVP55.js");
34137
34138
  const schema = {
34138
34139
  type: "object",
34139
34140
  properties: {
@@ -35163,7 +35164,7 @@ function parseInputValue(value) {
35163
35164
  return { type: "file", value };
35164
35165
  }
35165
35166
  function isValueFlag2(arg) {
35166
- return arg === "--file" || arg === "-f" || arg === "--input" || arg === "-i" || arg === "--sandbox" || arg === "-s" || arg === "--sandbox-id";
35167
+ return arg === "--file" || arg === "-f" || arg === "--input" || arg === "-i" || arg === "--output" || arg === "-o" || arg === "--sandbox" || arg === "-s" || arg === "--sandbox-id";
35167
35168
  }
35168
35169
  function parseInputArg(value) {
35169
35170
  const equalsIndex = value.indexOf("=");
@@ -35212,6 +35213,10 @@ function processArg2(result, arg, nextArg) {
35212
35213
  case "-s":
35213
35214
  result.sandboxId = nextArg;
35214
35215
  break;
35216
+ case "--output":
35217
+ case "-o":
35218
+ result.output = nextArg;
35219
+ break;
35215
35220
  case "--mock":
35216
35221
  result.mock = true;
35217
35222
  break;
@@ -35258,6 +35263,8 @@ Options:
35258
35263
  --file, -f <path> Path to content file (creates new sandbox, legacy)
35259
35264
  --input, -i <name=value> Named input (can specify multiple times)
35260
35265
  Value can be a file path or inline JSON
35266
+ --output, -o <dir> Copy outputs to this directory (default: cwd)
35267
+ Also supports LOOPLIA_OUTPUT_DIR env var
35261
35268
  --sandbox-id, -s <id> Resume existing sandbox
35262
35269
  --mock Use mock mode (no API calls)
35263
35270
  --no-streaming Disable streaming output
@@ -35278,6 +35285,9 @@ Examples:
35278
35285
 
35279
35286
  # Resume existing sandbox
35280
35287
  looplia run writing-kit --sandbox-id text-2025-12-18-abc123
35288
+
35289
+ # Copy outputs to specific directory (v0.7.2)
35290
+ looplia run writing-kit --file article.md --output ./results/
35281
35291
  `);
35282
35292
  }
35283
35293
  function getWorkspacePath2() {
@@ -35432,6 +35442,16 @@ function renderResult2(result) {
35432
35442
  \u274C Workflow failed: ${result.error ?? "Unknown error"}`);
35433
35443
  }
35434
35444
  }
35445
+ function handleOutputCopy(workspace, sandboxId, outputDir) {
35446
+ if (!outputDir) {
35447
+ return;
35448
+ }
35449
+ const copiedCount = copyOutputsToDestination(workspace, sandboxId, outputDir);
35450
+ if (copiedCount > 0) {
35451
+ console.log(`
35452
+ \u2713 ${copiedCount} output file(s) copied to ${outputDir}`);
35453
+ }
35454
+ }
35435
35455
  async function handleJitInstallation(workflowInfo) {
35436
35456
  if (!workflowInfo) {
35437
35457
  return true;
@@ -35488,6 +35508,10 @@ async function runRunCommand(args) {
35488
35508
  requiredSkills: workflowInfo?.skills
35489
35509
  });
35490
35510
  renderResult2(result);
35511
+ if (result.status === "success") {
35512
+ const outputDir = parsed.output || process.env.LOOPLIA_OUTPUT_DIR || process.cwd();
35513
+ handleOutputCopy(workspace, sandboxId, outputDir);
35514
+ }
35491
35515
  if (result.status !== "success") {
35492
35516
  process.exit(1);
35493
35517
  }
@@ -35569,7 +35593,7 @@ async function skillAdd(nameOrUrl, from) {
35569
35593
  }
35570
35594
  if (GITHUB_URL_PATTERN.test(nameOrUrl)) {
35571
35595
  console.log(`Installing skill from URL: ${nameOrUrl}...`);
35572
- const { installSkillFromUrl } = await import("./dist-5SEP7KKQ.js");
35596
+ const { installSkillFromUrl } = await import("./dist-3B4KUA76.js");
35573
35597
  const result2 = await installSkillFromUrl(nameOrUrl, true);
35574
35598
  switch (result2.status) {
35575
35599
  case "installed":
@@ -35806,7 +35830,7 @@ async function runSkillCommand(args) {
35806
35830
  }
35807
35831
 
35808
35832
  // src/index.ts
35809
- var VERSION = "0.7.1";
35833
+ var VERSION = "0.7.2";
35810
35834
  function printHelp5() {
35811
35835
  console.log(`
35812
35836
  looplia - Content intelligence CLI (v${VERSION})
@@ -12,13 +12,13 @@ import {
12
12
  loadSources,
13
13
  removeSource,
14
14
  saveSources
15
- } from "./chunk-DN3RSIIJ.js";
15
+ } from "./chunk-XTUQVJYH.js";
16
16
  import "./chunk-VRBGWKZ6.js";
17
17
  import {
18
18
  init_esm_shims
19
19
  } from "./chunk-Y55L47HC.js";
20
20
 
21
- // ../../packages/provider/dist/compiler-4VFX7JAN.js
21
+ // ../../packages/provider/dist/compiler-4B63UTUP.js
22
22
  init_esm_shims();
23
23
  export {
24
24
  DEFAULT_MARKETPLACE_SOURCES,
@@ -11,11 +11,11 @@ import {
11
11
  loadCompiledRegistry,
12
12
  removeSkill,
13
13
  updateSkill
14
- } from "./chunk-2TWYHMFD.js";
14
+ } from "./chunk-2ETB5RP7.js";
15
15
  import {
16
16
  syncRegistrySources,
17
17
  syncSource
18
- } from "./chunk-NUQVUYOZ.js";
18
+ } from "./chunk-HMJDIX7C.js";
19
19
  import {
20
20
  addSource,
21
21
  compileRegistry,
@@ -27,12 +27,12 @@ import {
27
27
  loadSources,
28
28
  removeSource,
29
29
  saveSources
30
- } from "./chunk-DN3RSIIJ.js";
30
+ } from "./chunk-XTUQVJYH.js";
31
31
  import {
32
32
  CORE_SKILLS,
33
33
  ensureWorkspace,
34
34
  isCoreSkill
35
- } from "./chunk-HSZZVXV5.js";
35
+ } from "./chunk-OIE7CSW6.js";
36
36
  import "./chunk-VRBGWKZ6.js";
37
37
  import "./chunk-Y55L47HC.js";
38
38
  export {
@@ -1,14 +1,16 @@
1
1
  #!/usr/bin/env bun
2
2
  import {
3
3
  SANDBOX_DIRS,
4
+ copyOutputsToDestination,
4
5
  createSandboxDirectories,
5
6
  generateRandomSuffix,
6
7
  generateSandboxId,
7
8
  generateSlug
8
- } from "./chunk-5WPEFJ5J.js";
9
+ } from "./chunk-QLL3W74D.js";
9
10
  import "./chunk-Y55L47HC.js";
10
11
  export {
11
12
  SANDBOX_DIRS,
13
+ copyOutputsToDestination,
12
14
  createSandboxDirectories,
13
15
  generateRandomSuffix,
14
16
  generateSandboxId,
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  syncRegistrySources,
4
4
  syncSource
5
- } from "./chunk-NUQVUYOZ.js";
6
- import "./chunk-DN3RSIIJ.js";
5
+ } from "./chunk-HMJDIX7C.js";
6
+ import "./chunk-XTUQVJYH.js";
7
7
  import "./chunk-VRBGWKZ6.js";
8
8
  import {
9
9
  init_esm_shims
10
10
  } from "./chunk-Y55L47HC.js";
11
11
 
12
- // ../../packages/provider/dist/sync-MXQ4NJWI.js
12
+ // ../../packages/provider/dist/sync-MFM46YAB.js
13
13
  init_esm_shims();
14
14
  export {
15
15
  syncRegistrySources,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@looplia/looplia-cli",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Looplia CLI - AI-powered workflow automation tool",
5
5
  "type": "module",
6
6
  "license": "Elastic-2.0",