@rtrentjones/greenlight 0.4.0 → 0.5.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.
@@ -3,14 +3,6 @@ import {
3
3
  report
4
4
  } from "./chunk-QFKE5JKC.js";
5
5
 
6
- // ../packages/shared/src/defineConfig.ts
7
- function defineConfig(config) {
8
- return config;
9
- }
10
-
11
- // ../packages/shared/src/load.ts
12
- import { createJiti } from "jiti";
13
-
14
6
  // ../packages/shared/src/schema.ts
15
7
  import { z } from "zod";
16
8
  var LaneEnum = z.enum(["astro", "next", "mcp", "agent"]);
@@ -25,6 +17,12 @@ var MATRIX = {
25
17
  mcp: { targets: ["workers", "oci"], data: ["none"] },
26
18
  agent: { targets: ["workers"], data: ["none", "kv"] }
27
19
  };
20
+ function describeMatrix() {
21
+ return Object.keys(MATRIX).map((lane) => {
22
+ const r = MATRIX[lane];
23
+ return ` ${lane.padEnd(6)} \u2192 target: ${r.targets.join(" | ")} data: ${r.data.join(" | ")}`;
24
+ }).join("\n");
25
+ }
28
26
  var ToolSchema = z.object({
29
27
  name: z.string().regex(/^[a-z][a-z0-9-]*$/, "tool name must be kebab-case starting with a letter"),
30
28
  lane: LaneEnum,
@@ -148,7 +146,13 @@ var ConfigSchema = z.object({
148
146
  }
149
147
  });
150
148
 
149
+ // ../packages/shared/src/defineConfig.ts
150
+ function defineConfig(config) {
151
+ return config;
152
+ }
153
+
151
154
  // ../packages/shared/src/load.ts
155
+ import { createJiti } from "jiti";
152
156
  async function loadConfig(path) {
153
157
  const jiti = createJiti(import.meta.url);
154
158
  const mod = await jiti.import(path);
@@ -476,6 +480,8 @@ function allPass(reports) {
476
480
  }
477
481
 
478
482
  export {
483
+ MATRIX,
484
+ describeMatrix,
479
485
  ConfigSchema,
480
486
  defineConfig,
481
487
  loadConfig,
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  defineConfig,
3
3
  defineVerify,
4
4
  loadConfig
5
- } from "./chunk-P6FRYOOV.js";
5
+ } from "./chunk-OBWWE7GE.js";
6
6
  import "./chunk-HX7VA25D.js";
7
7
  import "./chunk-N3IKUCSF.js";
8
8
  import "./chunk-KP3Y6WRU.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtrentjones/greenlight",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Greenlight CLI — setup and lifecycle for the harness.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,10 +31,10 @@
31
31
  "@anthropic-ai/sdk": "^0.69.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@rtrentjones/greenlight-loop": "0.4.0",
35
- "@rtrentjones/greenlight-adapters": "0.4.0",
36
- "@rtrentjones/greenlight-verify": "0.4.0",
37
- "@rtrentjones/greenlight-shared": "0.4.0"
34
+ "@rtrentjones/greenlight-adapters": "0.5.0",
35
+ "@rtrentjones/greenlight-loop": "0.5.0",
36
+ "@rtrentjones/greenlight-shared": "0.5.0",
37
+ "@rtrentjones/greenlight-verify": "0.5.0"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "node scripts/copy-assets.mjs && tsup",
@@ -1,10 +1,10 @@
1
- # Agent Worker. `greenlight add` rewrites `name` + the route domain + the account_id, and emits a
2
- # .github/workflows/deploy-<name>.yml that (on push to main) creates the KV namespace, deploys, sets
3
- # the GEMINI_API_KEY + RUN_TOKEN Worker secrets from GitHub secrets, seeds, and verifies. So you only
4
- # add those two GitHub secrets — no manual wrangler.
1
+ # Agent Worker. `greenlight add` rewrites `name` + the route domain, and emits a
2
+ # .github/workflows/deploy-<name>.yml that (on push to main) resolves the account id + KV namespace,
3
+ # deploys, sets the GEMINI_API_KEY + RUN_TOKEN Worker secrets from GitHub secrets, seeds, and verifies.
4
+ # So you only add those two GitHub secrets — no manual wrangler, no local secrets.
5
5
  name = "agent-tool"
6
- # Non-secret account id (committed config). `greenlight add` resolves + fills this from your domain's
7
- # zone; without it wrangler calls /memberships, which a scoped API token can't do.
6
+ # Non-secret account id. The emitted deploy workflow resolves it from your domain's zone in CI and
7
+ # fills this placeholder (wrangler can't call /memberships to auto-discover it with a scoped token).
8
8
  account_id = "REPLACE_WITH_CLOUDFLARE_ACCOUNT_ID"
9
9
  main = "src/index.ts"
10
10
  compatibility_date = "2025-06-01"