@marcusrbrown/infra 0.25.1 → 0.25.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.
Files changed (2) hide show
  1. package/dist/cli.js +13 -11
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -6950,7 +6950,7 @@ import { goke } from "goke";
6950
6950
  // package.json
6951
6951
  var package_default = {
6952
6952
  name: "@marcusrbrown/infra",
6953
- version: "0.25.1",
6953
+ version: "0.25.2",
6954
6954
  description: "Infrastructure management CLI \u2014 deploy automation, health checks, and MCP bridge",
6955
6955
  keywords: [
6956
6956
  "infra",
@@ -8390,6 +8390,13 @@ function registerSetupCommand(cli, commandLabel) {
8390
8390
  import { log as log3 } from "@clack/prompts";
8391
8391
  import { z as z6 } from "zod";
8392
8392
 
8393
+ // src/commands/agent/key-layout.ts
8394
+ var KEY_LAYOUT_VERSION = "fro-bot-agent-s3-layout/1";
8395
+ var LEGACY_KEY_LAYOUT_LABELS = new Set(["fro-bot/agent@v0.118.2", "fro-bot/agent@v0.119.2"]);
8396
+ function isKnownKeyLayoutVersion(label) {
8397
+ return label === KEY_LAYOUT_VERSION || LEGACY_KEY_LAYOUT_LABELS.has(label);
8398
+ }
8399
+
8393
8400
  // src/commands/agent/workflow-verify.ts
8394
8401
  var WORKFLOW_PATH = ".github/workflows/fro-bot.yaml";
8395
8402
  var STORAGE_ENVIRONMENT = "fro-bot-storage";
@@ -8405,9 +8412,6 @@ var CONTENT_EVENTS = new Set([
8405
8412
  "discussion",
8406
8413
  "discussion_comment"
8407
8414
  ]);
8408
- var VERIFIED_ACTION_SHA_BY_LAYOUT = {
8409
- "fro-bot/agent@v0.119.2": "83ed683da24111bd1474eb4bda39715ed5799bc2"
8410
- };
8411
8415
  var REQUIRED_S3_INPUTS = {
8412
8416
  "s3-backup": undefined,
8413
8417
  "s3-bucket": "FRO_BOT_S3_BUCKET",
@@ -8778,8 +8782,7 @@ function checkStorageAction(jobId, job, manifest, violations) {
8778
8782
  violations.push(`Storage job '${jobId}' must contain a fro-bot/agent action step.`);
8779
8783
  return;
8780
8784
  }
8781
- const verifiedSha = VERIFIED_ACTION_SHA_BY_LAYOUT[manifest.key_layout_version];
8782
- if (!verifiedSha) {
8785
+ if (!isKnownKeyLayoutVersion(manifest.key_layout_version)) {
8783
8786
  violations.push(`Unknown key_layout_version '${manifest.key_layout_version}'; refusing to verify fro-bot/agent.`);
8784
8787
  }
8785
8788
  const firstAgentIndex = steps.findIndex((step) => typeof step.uses === "string" && step.uses.startsWith("fro-bot/agent@"));
@@ -8807,8 +8810,8 @@ function checkStorageAction(jobId, job, manifest, violations) {
8807
8810
  for (const [index, step] of agentSteps.entries()) {
8808
8811
  const uses = String(step.uses);
8809
8812
  const ref = uses.split("@").at(-1) ?? "";
8810
- if (verifiedSha && ref !== verifiedSha) {
8811
- violations.push(`Storage job '${jobId}' action ref '${ref}' is not the verified layout for '${manifest.key_layout_version}'; ` + `storage job must pin fro-bot/agent to the verified SHA for '${manifest.key_layout_version}', not a moveable tag.`);
8813
+ if (!/^[0-9a-f]{40}$/i.test(ref)) {
8814
+ violations.push(`Storage job '${jobId}' fro-bot/agent step ${index + 1} ref '${ref}' is not a full commit SHA; ` + "storage job must pin fro-bot/agent to a full 40-hex commit SHA, not a moveable tag or branch.");
8812
8815
  }
8813
8816
  if (!isMapping(step.with)) {
8814
8817
  violations.push(`Storage job '${jobId}' agent step ${index + 1} is missing its S3 inputs.`);
@@ -9138,7 +9141,6 @@ var STORAGE_VARIABLE_NAMES = {
9138
9141
  prefix: "FRO_BOT_S3_PREFIX",
9139
9142
  expectedBucketOwner: "FRO_BOT_S3_EXPECTED_BUCKET_OWNER"
9140
9143
  };
9141
- var KNOWN_KEY_LAYOUT_VERSION = "fro-bot/agent@v0.119.2";
9142
9144
  var manifestSchema = z6.object({
9143
9145
  owner: z6.string().min(1),
9144
9146
  repo: z6.string().min(1),
@@ -9190,8 +9192,8 @@ function assertCanonicalPath(field, value, mustEndWithSlash) {
9190
9192
  }
9191
9193
  }
9192
9194
  function validateManifest(manifest) {
9193
- if (manifest.key_layout_version !== KNOWN_KEY_LAYOUT_VERSION) {
9194
- throw new Error(`Unknown handoff manifest key_layout_version '${manifest.key_layout_version}'; expected ${KNOWN_KEY_LAYOUT_VERSION}.`);
9195
+ if (!isKnownKeyLayoutVersion(manifest.key_layout_version)) {
9196
+ throw new Error(`Unknown handoff manifest key_layout_version '${manifest.key_layout_version}'; expected ${KEY_LAYOUT_VERSION}.`);
9195
9197
  }
9196
9198
  assertRepoFormat(`${manifest.owner}/${manifest.repo}`);
9197
9199
  assertCanonicalPath("s3_prefix", manifest.s3_prefix, false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcusrbrown/infra",
3
- "version": "0.25.1",
3
+ "version": "0.25.2",
4
4
  "description": "Infrastructure management CLI — deploy automation, health checks, and MCP bridge",
5
5
  "keywords": [
6
6
  "infra",