@agentsfleet/orly 0.10.3 → 0.10.4

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/package.json +1 -1
  2. package/src/config.ts +2 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsfleet/orly",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "description": "Repository-scoped engineering harness: renders agent rules, materialises the gates that enforce them, and proves the PR boundary \u2014 for any coding agent.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/config.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { createHash } from "node:crypto";
2
1
  import { existsSync, mkdirSync, readdirSync, readFileSync } from "node:fs";
3
2
  import { dirname, extname, join, relative } from "node:path";
4
3
 
5
- import { assertWritableInside, isObject, isString, JsonObject, objectValue, OrlyError, readJsonObject, RulesModel, stringArray } from "./model";
4
+ import { assertWritableInside, hashContent, isObject, isString, JsonObject, objectValue, OrlyError, readJsonObject, RulesModel, stringArray } from "./model";
6
5
  import { UNSCOPED_ENVIRONMENT } from "./git_env";
7
6
  import { validateCommands, validateSurfaces } from "./validation";
8
7
 
@@ -19,7 +18,6 @@ const VERSION_FIELD = "orly_version";
19
18
  const MANAGED_FIELD = "managed";
20
19
  const DIGESTS_FIELD = "digests";
21
20
  const DIGEST_ALGORITHM = "sha256";
22
- const DIGEST_ENCODING = "hex";
23
21
  const COMMANDS_FIELD = "commands";
24
22
  const CONFORM_COMMAND = "conform";
25
23
  const MAKE_COMMAND = "make";
@@ -139,7 +137,7 @@ function readDigests(value: unknown): Record<string, string> {
139
137
  /// and the alternative was a scanner suppression, which is how a real
140
138
  /// credential eventually rides through.
141
139
  export function contentDigest(bytes: Uint8Array): string {
142
- return `${DIGEST_ALGORITHM}:${createHash(DIGEST_ALGORITHM).update(bytes).digest(DIGEST_ENCODING)}`;
140
+ return `${DIGEST_ALGORITHM}:${hashContent(bytes)}`;
143
141
  }
144
142
 
145
143
  // Tolerates the unprefixed spelling 0.10.2 wrote for its one release, so a