@ultimat3/manifest 31.46.0 → 31.47.1

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/README.md CHANGED
@@ -6,7 +6,20 @@ it is how an agent learns what the app *is* without reading every file.
6
6
  `bun add @ultimat3/manifest` · guide: [Agents](https://github.com/developerz-ai/ultimate/wiki/Agents)
7
7
 
8
8
  ```ts
9
- import { buildManifest, emitManifest, assertNoDrift, verifyContract } from '@ultimat3/manifest';
9
+ import {
10
+ assertNoDrift,
11
+ buildManifest,
12
+ emitManifest,
13
+ frameworkSources,
14
+ type Manifest,
15
+ verifyContract,
16
+ } from '@ultimat3/manifest';
17
+
18
+ type Sources = Parameters<typeof frameworkSources>[0];
19
+ declare const app: Sources['app'];
20
+ declare const routes: NonNullable<Sources['routes']>;
21
+ declare const policies: NonNullable<Sources['policies']>;
22
+ declare const committed: Manifest;
10
23
 
11
24
  const manifest = buildManifest(frameworkSources({ app, routes, policies }));
12
25
  await emitManifest({ manifest }); // x manifest
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/manifest",
3
- "version": "31.46.0",
3
+ "version": "31.47.1",
4
4
  "description": "x.manifest.json: deterministic generated facts, contract diff, AGENTS.md budget",
5
5
  "keywords": [
6
6
  "ultimate",
@@ -43,12 +43,12 @@
43
43
  "test": "bun test"
44
44
  },
45
45
  "dependencies": {
46
- "@ultimat3/action": "31.46.0",
47
- "@ultimat3/core": "31.46.0",
48
- "@ultimat3/entity": "31.46.0",
49
- "@ultimat3/jobs": "31.46.0",
50
- "@ultimat3/query": "31.46.0",
51
- "@ultimat3/realtime": "31.46.0",
52
- "@ultimat3/schema": "31.46.0"
46
+ "@ultimat3/action": "31.47.1",
47
+ "@ultimat3/core": "31.47.1",
48
+ "@ultimat3/entity": "31.47.1",
49
+ "@ultimat3/jobs": "31.47.1",
50
+ "@ultimat3/query": "31.47.1",
51
+ "@ultimat3/realtime": "31.47.1",
52
+ "@ultimat3/schema": "31.47.1"
53
53
  }
54
54
  }
package/src/diff-input.ts CHANGED
@@ -5,26 +5,21 @@
5
5
  // Deliberately shallow: only the top level is compared, so an optional property added INSIDE a
6
6
  // nested object still reads as breaking — over-reporting is the safe side of a contract check.
7
7
 
8
- import { canonicalJson } from '@ultimat3/core';
8
+ import { canonicalJson, isJsonObject } from '@ultimat3/core';
9
9
  import type { ManifestChange } from './diff-change';
10
10
 
11
- type JsonObject = Readonly<Record<string, unknown>>;
12
-
13
- const isObject = (value: unknown): value is JsonObject =>
14
- typeof value === 'object' && value !== null && !Array.isArray(value);
15
-
16
11
  const names = (value: unknown): readonly string[] =>
17
12
  Array.isArray(value) ? value.filter((item): item is string => typeof item === 'string') : [];
18
13
 
19
14
  /** True when `after` accepts every payload `before` does, by only adding optional properties. */
20
15
  export function onlyAddsOptionalProperties(before: unknown, after: unknown): boolean {
21
- if (!isObject(before) || !isObject(after)) return false;
16
+ if (!isJsonObject(before) || !isJsonObject(after)) return false;
22
17
  // Only a CLOSED schema: an open one (`additionalProperties` true or absent) already accepted any
23
18
  // extra key, so a new typed property can refuse a payload it used to take (`{ trigger: 123 }`).
24
19
  if (before['additionalProperties'] !== false) return false;
25
20
  const beforeProps = before['properties'];
26
21
  const afterProps = after['properties'];
27
- if (!isObject(beforeProps) || !isObject(afterProps)) return false;
22
+ if (!isJsonObject(beforeProps) || !isJsonObject(afterProps)) return false;
28
23
  // Everything but `properties` and `required` must be the same (type, additionalProperties, …).
29
24
  const { properties: _bp, required: beforeRequired, ...beforeRest } = before;
30
25
  const { properties: _ap, required: afterRequired, ...afterRest } = after;