@inf-monkeys-tech/monkeys 1.1.12 → 1.1.14

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 (46) hide show
  1. package/README.md +11 -1
  2. package/lib/contracts/declarative-control-http.d.ts +101 -0
  3. package/lib/contracts/declarative-control-http.d.ts.map +1 -1
  4. package/lib/contracts/declarative-control-http.js +5 -0
  5. package/lib/contracts/declarative-control-http.js.map +1 -1
  6. package/lib/contracts/declarative-control.d.ts +11 -0
  7. package/lib/contracts/declarative-control.d.ts.map +1 -1
  8. package/lib/contracts/declarative-control.js +3 -0
  9. package/lib/contracts/declarative-control.js.map +1 -1
  10. package/lib/contracts/declarative-publication-job.d.ts +24 -0
  11. package/lib/contracts/declarative-publication-job.d.ts.map +1 -1
  12. package/lib/contracts/render.d.ts +4 -0
  13. package/lib/contracts/render.d.ts.map +1 -1
  14. package/lib/contracts/render.js +2 -0
  15. package/lib/contracts/render.js.map +1 -1
  16. package/lib/esm/contracts/index.mjs +10 -0
  17. package/lib/esm/contracts/index.mjs.map +1 -1
  18. package/lib/esm/index.mjs +248 -9
  19. package/lib/esm/index.mjs.map +1 -1
  20. package/lib/esm/runtime/index.mjs +248 -9
  21. package/lib/esm/runtime/index.mjs.map +1 -1
  22. package/lib/esm/schemas/index.mjs +10 -0
  23. package/lib/esm/schemas/index.mjs.map +1 -1
  24. package/lib/json-schema/design-capability-catalog-artifact.schema.json +10 -0
  25. package/lib/json-schema/overlay-node.schema.json +5 -0
  26. package/lib/json-schema/page-runtime-bundle.schema.json +10 -0
  27. package/lib/json-schema/render-node.schema.json +5 -0
  28. package/lib/json-schema/render-tree.schema.json +5 -0
  29. package/lib/json-schema/view-provider-descriptor.schema.json +5 -0
  30. package/lib/json-schema/workbench-runtime-bundle.schema.json +10 -0
  31. package/lib/json-schema/workbench.schema.json +10 -0
  32. package/lib/runtime/declarative-control-compiler.d.ts +4 -0
  33. package/lib/runtime/declarative-control-compiler.d.ts.map +1 -1
  34. package/lib/runtime/declarative-control-compiler.js +29 -10
  35. package/lib/runtime/declarative-control-compiler.js.map +1 -1
  36. package/lib/runtime/declarative-runtime-contract.d.ts +45 -0
  37. package/lib/runtime/declarative-runtime-contract.d.ts.map +1 -0
  38. package/lib/runtime/declarative-runtime-contract.js +250 -0
  39. package/lib/runtime/declarative-runtime-contract.js.map +1 -0
  40. package/lib/runtime/index.d.ts +1 -0
  41. package/lib/runtime/index.d.ts.map +1 -1
  42. package/lib/runtime/index.js +1 -0
  43. package/lib/runtime/index.js.map +1 -1
  44. package/lib/schemas/index.d.ts +12 -0
  45. package/lib/schemas/index.d.ts.map +1 -1
  46. package/package.json +1 -1
package/README.md CHANGED
@@ -33,7 +33,7 @@ import { resolveThemeTokens } from '@inf-monkeys-tech/monkeys/runtime';
33
33
 
34
34
  `Page`、`PageRelease`、`Workbench`、`WorkbenchRelease`、`Navigation` 与 `NavigationRelease` 是六个独立的 control Ontology 合同。它们复用显式的 tenant scope、不可变 revision/hash、受限 AccessPolicy、RouteSpace/RouteClaim、PublicationPlan 和发布证据;不保存业务 Records、用户组成员、任意 URL 或可执行代码。
35
35
 
36
- `compilePageRuntimeBundle`, `compileWorkbenchRuntimeBundle`, and `compileNavigationRuntimeBundle` validate dependency evidence and caller-approved size limits, then produce rebuildable bundles before identity filtering. Navigation Page links use stable Page identity and the current published target registry; historical Page references in `NavigationRelease` remain audit evidence. Page upgrades, rollbacks, disappearance, and recovery do not require a Navigation publication. Workbench and action target bindings remain exact.
36
+ `compilePageRuntimeBundle`, `compileWorkbenchRuntimeBundle`, and `compileNavigationRuntimeBundle` validate dependency evidence and caller-approved size limits, then produce rebuildable bundles before identity filtering. Navigation Page links use stable Page identity and the current published target registry; historical Page references in `NavigationRelease` remain audit evidence. Page upgrades, rollbacks, disappearance, and recovery do not require a Navigation publication. Workbench target and action dependency snapshots remain exact; runtime provider selection uses the public contract described below.
37
37
 
38
38
  `projectCurrentNavigationPages` refreshes Page routes and access policies from a complete, tenant-authorized catalog. Consumers hide unavailable or disabled nodes and empty groups, and enforce both Navigation audience and current Page permissions. Catalog failures remain errors. Persisted release and dependency hashes are not rewritten by runtime projection.
39
39
 
@@ -53,3 +53,13 @@ yarn pack:check
53
53
  `compileLegacyPageRuntimeBundle` and `LegacyPageRuntimeBundleSchema` are explicit compatibility boundaries for pre-canonical resolved Page releases. They retain exact historical View or projection references, dependency checks, and content identities without inventing canonical View references or Shell descriptors. Legacy compilation rejects canonical bindings and Domain Query bindings; use `resolvePage` and `compilePageRuntimeBundle` for current declarations.
54
54
 
55
55
  The current `OntologyBindingSchema`, `PageRuntimeBundleSchema`, and `compilePageRuntimeBundle` keep their canonical View and Shell requirements. Do not choose the legacy compiler as a fallback after a current contract fails validation. Server migrations must select the compatibility boundary for the existing legacy API, not expose that choice as an untrusted request option.
56
+
57
+ ### Stable runtime contracts
58
+
59
+ `runtimeContractVersion` is a provider-owned public contract identifier, independent of implementation revisions. `resolvePage` and `compileWorkbenchRuntimeBundle` derive it from exact governed registrations. The Page compiler rejects user-supplied contract labels that disagree with those registrations. A compatible implementation can serve a previously compiled RenderNode without changing the published definition or its dependency hashes.
60
+
61
+ `assertViewProviderContract` checks provider/capability identity and ownership, then checks the declared contract. Unversioned nodes require exact revisions. `assertDeclarativeCapabilityContract` can prove an unversioned snapshot equivalent by reconstructing and comparing its complete immutable manifest/provider hashes; IDs alone are insufficient. `projectRuntimeContracts` additionally uses governed historical entries to enrich a rebuildable Page or Workbench projection. It preserves definitions, release references and dependency snapshots, and recalculates only the projection content hash.
62
+
63
+ `assertCompatibleCapabilityUpgrade` guards catalog activation and package publication. Compatible inputs accept every historical value; outputs must remain valid for historical consumers. Optional input properties, optional ports, enum widening and documentation annotations are supported; unknown Schema changes fail closed. Provider identity, lifecycle, effects, placement and access requirements remain protected. Breaking changes require a separate capability/provider identity with the existing implementation retained. Behavioral regression tests remain necessary alongside Schema checks.
64
+
65
+ `sameSchemaContract` compares stable identity, tenant scope, Schema version and content hash, allowing a different metadata revision for identical Schema content. Raw query results, permissions, command validation and immutable snapshot verification must continue to use their owning validators.