@rtrentjones/greenlight 0.2.11 → 0.2.12

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/dist/bin.js +11 -7
  2. package/package.json +3 -3
package/dist/bin.js CHANGED
@@ -414,7 +414,7 @@ function tokensForTool(tool) {
414
414
  }
415
415
 
416
416
  // src/version.ts
417
- var MODULE_REF = "v0.2.11";
417
+ var MODULE_REF = "v0.2.12";
418
418
  var MODULE_SOURCE_BASE = "git::https://github.com/RTrentJones/greenlight.git//infra/modules";
419
419
  function moduleSource(module, ref = MODULE_REF) {
420
420
  return `${MODULE_SOURCE_BASE}/${module}?ref=${ref}`;
@@ -1101,13 +1101,13 @@ function vendorDeps(vendorDir) {
1101
1101
  }
1102
1102
  function starterVerifyConfig(lane, target) {
1103
1103
  const spec = lane === "mcp" ? "mode: 'mcp', expectTools: []" : "mode: 'api', checks: [{ path: '/', status: 200 }]";
1104
- const logHint = target === "oci" ? "oci logging-search search-logs ... // the instance/container logs" : target === "vercel" ? "vercel logs <deployment-url> --token $VERCEL_API_TOKEN" : "wrangler tail --once // workers observability";
1104
+ const logHint = target === "vercel" ? 'vercel logs "$GREENLIGHT_VERIFY_URL" --token "$VERCEL_API_TOKEN" 2>&1 | head -40 || true' : 'curl -sS -i "$GREENLIGHT_VERIFY_URL" 2>&1 | head -30 || true';
1105
1105
  return `// Greenlight verify spec \u2014 edit to assert this tool's real contract.
1106
1106
  export default {
1107
1107
  ${spec},
1108
1108
  // Telemetry-into-verify: a shell command run ONLY when this report FAILS; its last ~50 lines
1109
- // attach to the report so the agent/CI sees the "why" in-loop. Best-effort (never fails the
1110
- // gate). Uncomment + adjust:
1109
+ // attach to the report so the agent/CI sees the "why" in-loop. $GREENLIGHT_VERIFY_URL is the
1110
+ // failing URL (no hard-coding). Best-effort (never fails the gate). Uncomment + adjust:
1111
1111
  // logsOnFailure: '${logHint}',
1112
1112
  };
1113
1113
  `;
@@ -1480,8 +1480,10 @@ function nextVerifyConfig(name) {
1480
1480
  // { mode: 'test', command: 'pnpm test' } + a tolerant deps-install step in greenlight-verify.yml.
1481
1481
  const bypass = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
1482
1482
  // Telemetry-into-verify: on a FAILED report, fetch the Vercel deployment's runtime logs and attach
1483
- // the tail to the report (best-effort, never fails the gate). Needs VERCEL_API_TOKEN in CI.
1484
- const logsOnFailure = 'vercel logs "$DEPLOYMENT_URL" --token "$VERCEL_API_TOKEN" 2>&1 || true';
1483
+ // the tail to the report (best-effort, never fails the gate). $GREENLIGHT_VERIFY_URL is the exact
1484
+ // failing deployment URL (injected \u2014 no hard-coding); needs VERCEL_API_TOKEN in CI.
1485
+ const logsOnFailure =
1486
+ 'vercel logs "$GREENLIGHT_VERIFY_URL" --token "$VERCEL_API_TOKEN" 2>&1 | head -40 || true';
1485
1487
  const api = bypass
1486
1488
  ? {
1487
1489
  mode: 'api',
@@ -2245,7 +2247,9 @@ function attachFailureLogs(reports, specs, toolDir) {
2245
2247
  cwd: toolDir,
2246
2248
  timeout: 3e4,
2247
2249
  encoding: "utf8",
2248
- maxBuffer: 10 * 1024 * 1024
2250
+ maxBuffer: 10 * 1024 * 1024,
2251
+ // Let the command target the exact failing URL without hard-coding it.
2252
+ env: { ...process.env, GREENLIGHT_VERIFY_URL: report.url }
2249
2253
  });
2250
2254
  const out = `${res.stdout ?? ""}${res.stderr ?? ""}`.trimEnd();
2251
2255
  const tail = out.split("\n").slice(-LOG_TAIL_LINES).join("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtrentjones/greenlight",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "Greenlight CLI — setup and lifecycle for the harness.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,9 +31,9 @@
31
31
  "@anthropic-ai/sdk": "^0.69.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@rtrentjones/greenlight-loop": "0.2.4",
35
- "@rtrentjones/greenlight-shared": "0.2.4",
36
34
  "@rtrentjones/greenlight-adapters": "0.2.4",
35
+ "@rtrentjones/greenlight-shared": "0.2.4",
36
+ "@rtrentjones/greenlight-loop": "0.2.4",
37
37
  "@rtrentjones/greenlight-verify": "0.2.4"
38
38
  },
39
39
  "scripts": {