harness-evolver 2.6.0 → 2.6.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.
Files changed (2) hide show
  1. package/bin/install.js +41 -13
  2. package/package.json +1 -1
package/bin/install.js CHANGED
@@ -231,20 +231,48 @@ async function main() {
231
231
 
232
232
  // LangSmith CLI
233
233
  const hasLangsmithCli = checkCommand("langsmith-cli --version");
234
- if (hasLangsmithCli) {
235
- console.log(` ${GREEN}✓${RESET} langsmith-cli already installed`);
234
+ const langsmithCredsDir = process.platform === "darwin"
235
+ ? path.join(HOME, "Library", "Application Support", "langsmith-cli")
236
+ : path.join(HOME, ".config", "langsmith-cli");
237
+ const langsmithCredsFile = path.join(langsmithCredsDir, "credentials");
238
+ const hasLangsmithCreds = fs.existsSync(langsmithCredsFile);
239
+
240
+ if (hasLangsmithCli && hasLangsmithCreds) {
241
+ console.log(` ${GREEN}✓${RESET} langsmith-cli installed and authenticated`);
236
242
  } else {
237
- console.log(` ${BOLD}LangSmith CLI${RESET} — rich trace analysis (error rates, latency, token usage)`);
238
- console.log(` ${DIM}uv tool install langsmith-cli && langsmith-cli auth login${RESET}`);
239
- const lsAnswer = await ask(rl, `\n ${YELLOW}Install langsmith-cli? [y/N]:${RESET} `);
240
- if (lsAnswer.trim().toLowerCase() === "y") {
241
- console.log(`\n Installing langsmith-cli...`);
242
- try {
243
- execSync("uv tool install langsmith-cli", { stdio: "inherit" });
244
- console.log(`\n ${GREEN}✓${RESET} langsmith-cli installed`);
245
- console.log(` ${YELLOW}Run ${BOLD}langsmith-cli auth login${RESET}${YELLOW} to authenticate with your LangSmith API key.${RESET}\n`);
246
- } catch {
247
- console.log(`\n ${RED}Failed.${RESET} Install manually: uv tool install langsmith-cli\n`);
243
+ if (!hasLangsmithCli) {
244
+ console.log(` ${BOLD}LangSmith CLI${RESET} rich trace analysis (error rates, latency, token usage)`);
245
+ const lsAnswer = await ask(rl, `\n ${YELLOW}Install langsmith-cli? [y/N]:${RESET} `);
246
+ if (lsAnswer.trim().toLowerCase() === "y") {
247
+ console.log(`\n Installing langsmith-cli...`);
248
+ try {
249
+ execSync("uv tool install langsmith-cli", { stdio: "inherit" });
250
+ console.log(`\n ${GREEN}✓${RESET} langsmith-cli installed`);
251
+ } catch {
252
+ console.log(`\n ${RED}Failed.${RESET} Install manually: uv tool install langsmith-cli\n`);
253
+ }
254
+ }
255
+ } else {
256
+ console.log(` ${GREEN}✓${RESET} langsmith-cli already installed`);
257
+ }
258
+
259
+ // Auth — ask for API key inline if not already configured
260
+ if (!hasLangsmithCreds) {
261
+ console.log(`\n ${BOLD}LangSmith API Key${RESET} — get yours at ${DIM}https://smith.langchain.com/settings${RESET}`);
262
+ const apiKey = await ask(rl, ` ${YELLOW}Paste your LangSmith API key (or Enter to skip):${RESET} `);
263
+ const key = apiKey.trim();
264
+ if (key && key.startsWith("lsv2_")) {
265
+ try {
266
+ fs.mkdirSync(langsmithCredsDir, { recursive: true });
267
+ fs.writeFileSync(langsmithCredsFile, `LANGSMITH_API_KEY=${key}\n`);
268
+ console.log(` ${GREEN}✓${RESET} LangSmith API key saved`);
269
+ } catch {
270
+ console.log(` ${RED}Failed to save credentials.${RESET} Set LANGSMITH_API_KEY in your shell instead.`);
271
+ }
272
+ } else if (key) {
273
+ console.log(` ${YELLOW}Doesn't look like a LangSmith key (should start with lsv2_). Skipped.${RESET}`);
274
+ } else {
275
+ console.log(` ${DIM}Skipped. Set LANGSMITH_API_KEY later or run: langsmith-cli auth login${RESET}`);
248
276
  }
249
277
  }
250
278
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-evolver",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "Meta-Harness-style autonomous harness optimization for Claude Code",
5
5
  "author": "Raphael Valdetaro",
6
6
  "license": "MIT",