@ultimat3/manifest 16.0.0 → 17.0.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.
package/CLAUDE.md CHANGED
@@ -30,6 +30,13 @@ by the CLI, not imported.
30
30
 
31
31
  ## Invariants
32
32
 
33
+ - **`checkAgentsMd`'s `maxBytes` is a whole number of 0 or more** (`As of 2026-08-26`),
34
+ `finiteCount('checkAgentsMd', 'maxBytes', …)`, and it is screened in `checkAgentsMd` rather than
35
+ in `assertAgentsMd` because that is the function that READS the option — "inspect without
36
+ throwing" is a promise about the repository's state, not about a caller passing a budget that is
37
+ not a number. `bytes > maxBytes` is false when `maxBytes` is `NaN`, so `assertAgentsMd` passed an
38
+ `AGENTS.md` of any size while the `AgentsMdCheck` it returned reported `ok: false`: the gate's
39
+ throw and the gate's report disagreeing about one file, with nothing raising.
33
40
  - **No nondeterminism.** No timestamp, git sha, hostname, counter, or unsorted iteration.
34
41
  `buildManifest` is pure — it must never read a registry, a clock, or the filesystem.
35
42
  - Top-level key order in the file is fixed by `KEY_ORDER` in `emit.ts` — `as const satisfies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/manifest",
3
- "version": "16.0.0",
3
+ "version": "17.0.0",
4
4
  "description": "x.manifest.json: deterministic generated facts, contract diff, AGENTS.md budget",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,10 +31,10 @@
31
31
  "test": "bun test"
32
32
  },
33
33
  "dependencies": {
34
- "@ultimat3/action": "16.0.0",
35
- "@ultimat3/core": "16.0.0",
36
- "@ultimat3/entity": "16.0.0",
37
- "@ultimat3/jobs": "16.0.0",
38
- "@ultimat3/query": "16.0.0"
34
+ "@ultimat3/action": "17.0.0",
35
+ "@ultimat3/core": "17.0.0",
36
+ "@ultimat3/entity": "17.0.0",
37
+ "@ultimat3/jobs": "17.0.0",
38
+ "@ultimat3/query": "17.0.0"
39
39
  }
40
40
  }
package/src/agents-md.ts CHANGED
@@ -15,6 +15,7 @@
15
15
  // This module therefore checks exactly two things: that the file exists, and that it has not
16
16
  // grown into a document nobody reads. It never writes.
17
17
 
18
+ import { finiteCount } from '@ultimat3/core';
18
19
  import { AgentsMdMissingError, AgentsMdTooLargeError } from './errors';
19
20
 
20
21
  export const AGENTS_MD_FILENAME = 'AGENTS.md';
@@ -43,7 +44,12 @@ export interface CheckAgentsMdInput {
43
44
  /** Inspect without throwing — `x verify --json` reports, `assertAgentsMd` enforces. */
44
45
  export async function checkAgentsMd(input: CheckAgentsMdInput = {}): Promise<AgentsMdCheck> {
45
46
  const path = input.path ?? `./${AGENTS_MD_FILENAME}`;
46
- const maxBytes = input.maxBytes ?? AGENTS_MD_MAX_BYTES;
47
+ // `bytes > maxBytes` is false when `maxBytes` is `NaN`, so `assertAgentsMd` passed a file of any
48
+ // size while the check it returned reported `ok: false` — the gate's throw and the gate's report
49
+ // disagreeing about one file, with nothing raising. Screened here rather than in `assertAgentsMd`
50
+ // because this is the function that reads the option; "inspect without throwing" is about the
51
+ // file's state, and a budget that is not a number is the caller's bug, not the repository's.
52
+ const maxBytes = finiteCount('checkAgentsMd', 'maxBytes', input.maxBytes ?? AGENTS_MD_MAX_BYTES);
47
53
  const file = Bun.file(path);
48
54
 
49
55
  if (!(await file.exists())) {