libretto 0.6.6 → 0.6.7-experimental.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.
@@ -330,7 +330,7 @@ function copySkills() {
330
330
  const agentDirs = detectAgentDirs(REPO_ROOT);
331
331
  if (agentDirs.length === 0) {
332
332
  console.log(
333
- "\n\u26A0 No .agents/ or .claude/ directory found. Libretto skills were not installed."
333
+ "\n\u26A0\uFE0F No .agents/ or .claude/ directory found. Libretto skills were not installed."
334
334
  );
335
335
  console.log(
336
336
  " Create one of these directories in your repo root and rerun `npx libretto setup` to install skills:"
@@ -15,12 +15,18 @@ function parseEnvFile(content) {
15
15
  for (const raw of content.split("\n")) {
16
16
  const line = raw.trim();
17
17
  if (!line || line.startsWith("#")) continue;
18
- const eqIndex = line.indexOf("=");
18
+ const withoutExport = line.startsWith("export ") ? line.slice("export ".length).trimStart() : line;
19
+ const eqIndex = withoutExport.indexOf("=");
19
20
  if (eqIndex === -1) continue;
20
- const key = line.slice(0, eqIndex).trim();
21
- let value = line.slice(eqIndex + 1).trim();
21
+ const key = withoutExport.slice(0, eqIndex).trim();
22
+ let value = withoutExport.slice(eqIndex + 1).trim();
22
23
  if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
23
24
  value = value.slice(1, -1);
25
+ } else {
26
+ const commentIndex = value.search(/\s#/);
27
+ if (commentIndex >= 0) {
28
+ value = value.slice(0, commentIndex).trimEnd();
29
+ }
24
30
  }
25
31
  vars[key] = value;
26
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libretto",
3
- "version": "0.6.6",
3
+ "version": "0.6.7-experimental.0",
4
4
  "description": "AI-powered browser automation library and CLI built on Playwright",
5
5
  "license": "MIT",
6
6
  "homepage": "https://libretto.sh",
@@ -4,7 +4,7 @@ description: "Browser automation CLI for building, maintaining, and running brow
4
4
  license: MIT
5
5
  metadata:
6
6
  author: saffron-health
7
- version: "0.6.4"
7
+ version: "0.6.6"
8
8
  ---
9
9
 
10
10
  ## How Libretto Works
@@ -4,7 +4,7 @@ description: "Read-only Libretto workflow for diagnosing live browser state with
4
4
  license: MIT
5
5
  metadata:
6
6
  author: saffron-health
7
- version: "0.6.4"
7
+ version: "0.6.6"
8
8
  ---
9
9
 
10
10
  ## How Libretto Read-Only Works
@@ -431,7 +431,7 @@ function copySkills(): void {
431
431
 
432
432
  if (agentDirs.length === 0) {
433
433
  console.log(
434
- "\n No .agents/ or .claude/ directory found. Libretto skills were not installed.",
434
+ "\n⚠️ No .agents/ or .claude/ directory found. Libretto skills were not installed.",
435
435
  );
436
436
  console.log(
437
437
  " Create one of these directories in your repo root and rerun `npx libretto setup` to install skills:",
@@ -26,16 +26,25 @@ function parseEnvFile(content: string): Record<string, string> {
26
26
  for (const raw of content.split("\n")) {
27
27
  const line = raw.trim();
28
28
  if (!line || line.startsWith("#")) continue;
29
- const eqIndex = line.indexOf("=");
29
+ const withoutExport = line.startsWith("export ")
30
+ ? line.slice("export ".length).trimStart()
31
+ : line;
32
+ const eqIndex = withoutExport.indexOf("=");
30
33
  if (eqIndex === -1) continue;
31
- const key = line.slice(0, eqIndex).trim();
32
- let value = line.slice(eqIndex + 1).trim();
34
+ const key = withoutExport.slice(0, eqIndex).trim();
35
+ let value = withoutExport.slice(eqIndex + 1).trim();
33
36
  // Strip matching quotes
34
37
  if (
35
38
  (value.startsWith('"') && value.endsWith('"')) ||
36
39
  (value.startsWith("'") && value.endsWith("'"))
37
40
  ) {
38
41
  value = value.slice(1, -1);
42
+ } else {
43
+ // Strip inline comments from unquoted values
44
+ const commentIndex = value.search(/\s#/);
45
+ if (commentIndex >= 0) {
46
+ value = value.slice(0, commentIndex).trimEnd();
47
+ }
39
48
  }
40
49
  vars[key] = value;
41
50
  }