@nocobase/app-plugin-foundation 0.1.0-beta.5 → 0.1.0-beta.6

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 (124) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +28 -4
  3. package/dist/client/business-modules.d.ts.map +1 -1
  4. package/dist/client/business-modules.js +11 -0
  5. package/dist/client/business-modules.js.map +1 -1
  6. package/dist/client/components/foundation-page.d.ts.map +1 -1
  7. package/dist/client/components/foundation-page.js +39 -58
  8. package/dist/client/components/foundation-page.js.map +1 -1
  9. package/dist/client/components/module-matrix.d.ts.map +1 -1
  10. package/dist/client/components/module-matrix.js +3 -1
  11. package/dist/client/components/module-matrix.js.map +1 -1
  12. package/dist/client/components/ui/skeleton.d.ts +3 -0
  13. package/dist/client/components/ui/skeleton.d.ts.map +1 -0
  14. package/dist/client/components/ui/skeleton.js +7 -0
  15. package/dist/client/components/ui/skeleton.js.map +1 -0
  16. package/dist/client/locales/de-DE.d.ts.map +1 -1
  17. package/dist/client/locales/de-DE.js +23 -10
  18. package/dist/client/locales/de-DE.js.map +1 -1
  19. package/dist/client/locales/en-US.d.ts +13 -0
  20. package/dist/client/locales/en-US.d.ts.map +1 -1
  21. package/dist/client/locales/en-US.js +23 -10
  22. package/dist/client/locales/en-US.js.map +1 -1
  23. package/dist/client/locales/es-ES.d.ts.map +1 -1
  24. package/dist/client/locales/es-ES.js +24 -11
  25. package/dist/client/locales/es-ES.js.map +1 -1
  26. package/dist/client/locales/fr-FR.d.ts.map +1 -1
  27. package/dist/client/locales/fr-FR.js +24 -11
  28. package/dist/client/locales/fr-FR.js.map +1 -1
  29. package/dist/client/locales/id-ID.d.ts.map +1 -1
  30. package/dist/client/locales/id-ID.js +23 -10
  31. package/dist/client/locales/id-ID.js.map +1 -1
  32. package/dist/client/locales/ja-JP.d.ts.map +1 -1
  33. package/dist/client/locales/ja-JP.js +23 -10
  34. package/dist/client/locales/ja-JP.js.map +1 -1
  35. package/dist/client/locales/pt-BR.d.ts.map +1 -1
  36. package/dist/client/locales/pt-BR.js +24 -11
  37. package/dist/client/locales/pt-BR.js.map +1 -1
  38. package/dist/client/locales/vi-VN.d.ts.map +1 -1
  39. package/dist/client/locales/vi-VN.js +23 -10
  40. package/dist/client/locales/vi-VN.js.map +1 -1
  41. package/dist/client/locales/zh-CN.d.ts.map +1 -1
  42. package/dist/client/locales/zh-CN.js +23 -10
  43. package/dist/client/locales/zh-CN.js.map +1 -1
  44. package/dist/client/locales/zh-TW.d.ts.map +1 -1
  45. package/dist/client/locales/zh-TW.js +23 -10
  46. package/dist/client/locales/zh-TW.js.map +1 -1
  47. package/dist/server/api-contracts.d.ts +14 -0
  48. package/dist/server/api-contracts.d.ts.map +1 -0
  49. package/dist/server/api-contracts.js +184 -0
  50. package/dist/server/api-contracts.js.map +1 -0
  51. package/dist/server/api-evidence-schema.d.ts +5 -0
  52. package/dist/server/api-evidence-schema.d.ts.map +1 -0
  53. package/dist/server/api-evidence-schema.js +24 -0
  54. package/dist/server/api-evidence-schema.js.map +1 -0
  55. package/dist/server/api-evidence.d.ts +2 -0
  56. package/dist/server/api-evidence.d.ts.map +1 -1
  57. package/dist/server/api-evidence.js +33 -15
  58. package/dist/server/api-evidence.js.map +1 -1
  59. package/dist/server/capabilities/data.d.ts.map +1 -1
  60. package/dist/server/capabilities/data.js +99 -14
  61. package/dist/server/capabilities/data.js.map +1 -1
  62. package/dist/server/capabilities/intelligence.d.ts.map +1 -1
  63. package/dist/server/capabilities/intelligence.js +86 -20
  64. package/dist/server/capabilities/intelligence.js.map +1 -1
  65. package/dist/server/capabilities/messaging.d.ts.map +1 -1
  66. package/dist/server/capabilities/messaging.js +43 -9
  67. package/dist/server/capabilities/messaging.js.map +1 -1
  68. package/dist/server/capabilities/people.d.ts.map +1 -1
  69. package/dist/server/capabilities/people.js +50 -17
  70. package/dist/server/capabilities/people.js.map +1 -1
  71. package/dist/server/capabilities/platform.d.ts.map +1 -1
  72. package/dist/server/capabilities/platform.js +19 -8
  73. package/dist/server/capabilities/platform.js.map +1 -1
  74. package/dist/server/capabilities/processes.d.ts.map +1 -1
  75. package/dist/server/capabilities/processes.js +58 -25
  76. package/dist/server/capabilities/processes.js.map +1 -1
  77. package/dist/server/capabilities/types.d.ts +2 -0
  78. package/dist/server/capabilities/types.d.ts.map +1 -1
  79. package/dist/server/capabilities/types.js.map +1 -1
  80. package/dist/server/endpoint-chain.d.ts.map +1 -1
  81. package/dist/server/endpoint-chain.js +4 -1
  82. package/dist/server/endpoint-chain.js.map +1 -1
  83. package/dist/server/inventory.d.ts +2 -0
  84. package/dist/server/inventory.d.ts.map +1 -1
  85. package/dist/server/inventory.js +8 -1
  86. package/dist/server/inventory.js.map +1 -1
  87. package/dist/server/module-manifest.d.ts.map +1 -1
  88. package/dist/server/module-manifest.js +2 -0
  89. package/dist/server/module-manifest.js.map +1 -1
  90. package/dist/server/module-source-cache.d.ts +10 -0
  91. package/dist/server/module-source-cache.d.ts.map +1 -0
  92. package/dist/server/module-source-cache.js +100 -0
  93. package/dist/server/module-source-cache.js.map +1 -0
  94. package/dist/server/module-sources.d.ts +5 -1
  95. package/dist/server/module-sources.d.ts.map +1 -1
  96. package/dist/server/module-sources.js +38 -8
  97. package/dist/server/module-sources.js.map +1 -1
  98. package/dist/server/reliable-history.d.ts +8 -0
  99. package/dist/server/reliable-history.d.ts.map +1 -0
  100. package/dist/server/reliable-history.js +93 -0
  101. package/dist/server/reliable-history.js.map +1 -0
  102. package/dist/server/routes/index.js +1 -1
  103. package/dist/server/routes/index.js.map +1 -1
  104. package/dist/server/routes/schemas.d.ts.map +1 -1
  105. package/dist/server/routes/schemas.js +15 -1
  106. package/dist/server/routes/schemas.js.map +1 -1
  107. package/dist/server/services/foundation.d.ts +6 -0
  108. package/dist/server/services/foundation.d.ts.map +1 -1
  109. package/dist/server/services/foundation.js +113 -14
  110. package/dist/server/services/foundation.js.map +1 -1
  111. package/dist/server/source-aliases.d.ts +2 -1
  112. package/dist/server/source-aliases.d.ts.map +1 -1
  113. package/dist/server/source-aliases.js +10 -3
  114. package/dist/server/source-aliases.js.map +1 -1
  115. package/dist/server/source-evidence.d.ts +2 -0
  116. package/dist/server/source-evidence.d.ts.map +1 -1
  117. package/dist/server/source-evidence.js +8 -0
  118. package/dist/server/source-evidence.js.map +1 -1
  119. package/dist/shared/foundation.d.ts +26 -1
  120. package/dist/shared/foundation.d.ts.map +1 -1
  121. package/dist/shared/foundation.js +6 -0
  122. package/dist/shared/foundation.js.map +1 -1
  123. package/package.json +1 -1
  124. package/skills/nocobase-app-plugin-foundation/SKILL.md +23 -3
@@ -35,12 +35,18 @@ The authentication and authorization plugins are registered, as in the default t
35
35
  - Collected read-only by the plugin; nothing reports to it, so there is nothing to register per capability.
36
36
  - In use means wired in: a persisted lifecycle, an enabled schedule, a connected mailbox, a configured notification channel, an API key that has been used. Zero uses still count as in use.
37
37
  - Needs setup names what is missing in its reason, such as `noChannel` or `noDrive`.
38
- - Undetermined means the evidence could not be read this time, never that it is unused; the details list what could not be read.
39
- - AI and agents are in use with an enabled model service or a registered Runner. Native OnlineAgent and model gateway calls do not require an `agAgents` record. Stored Agent definitions and historical usage alone do not prove current configuration. If neither execution path is confirmed and a required read failed, leave the status undetermined. Preserve another confirmed active path when optional statistics fail; never turn a failed read into zero or a missing-configuration claim.
38
+ - Information pending update means the evidence could not be read this time, never that it is unused. Use the top Refresh button to collect again; capability details have no separate retry button. If the initial page request fails with no overview or top Refresh available, use the page's Try again button. Expand the read details for sanitized source notes. Permission denial still hides cached information and offers no retry.
39
+ - AI and agents are in use with an enabled model service or a registered Runner. Native OnlineAgent and model gateway calls do not require an `agAgents` record. Stored Agent definitions and historical usage alone do not prove current configuration. Keep unreadable execution paths as pending subparts so reliable active evidence and metrics can retain their original dates. A successfully read zero invalidates that path's earlier active evidence through subsequent failures. If neither execution path has current or retained active evidence and a required read failed, leave the status undetermined. Preserve another confirmed active path when optional statistics fail; never turn a failed read into zero or a missing-configuration claim.
40
40
  - Business record ownership uses `server/catalog.ts`. If an unclassified runtime extension makes ownership uncertain, business counts are withheld; add a supported ownership adapter rather than interpreting them as zero.
41
41
 
42
42
  ## Verification
43
43
 
44
+ The application service keeps reliable active statuses, subpart statuses and complete metrics in memory. Retained values expose their original `checkedAt` and display “Last confirmed”; the overview timestamp is the latest check. Current reliable values take precedence, including zero. Earlier unused or needs-setup states do not become current negative conclusions after a failure. File counts, bytes and table counts require complete candidate discovery as well as successful aggregation to be exact. Without complete history, partial values read “Counted …” and “Some data is pending update”; wholly unreadable values remain pending. A fully confirmed empty catalog still reports exact zero. File facts retained from complete discovery carry their original date as well.
45
+
46
+ History is service-local, isolated by application and default connection identity, and invalidated conservatively on catalog, physical table, provider/ownership, relevant configuration or readable definition changes. It uses existing reads only. Restarting or replacing the application service clears it; separate server processes have independent histories. There is no persistent data, background collection or automatic retry. Authorization always runs before the service; a browser refresh receiving `401` or `403` hides internal cached values.
47
+
48
+ The existing deadline preserves evidence completed before another read stalled, including confirmed configuration and partial file statistics. This does not issue a second query or extend the deadline. Late completions cannot replace the response, and queries already in flight retain their shared slots until they settle.
49
+
44
50
  - As the root administrator, `/foundation` shows the capabilities available in this runtime, and `GET /api/foundation/overview` answers `200`.
45
51
  - As any other user, the page is not in the menu, and the route answers `403 FOUNDATION_FORBIDDEN`.
46
52
  - After adding a Collection, a lifecycle or a notification channel and refreshing, the matching capability changes.
@@ -85,16 +91,30 @@ Literal JSX props, destructured defaults, loader aliases and finite literal arra
85
91
 
86
92
  Collection evidence uses at most five compact name tags and the total count on the overview. The full catalog opens in a temporary dialog with a bounded scrolling body and fixed pagination controls; opening it does not expand the capability card. Search is debounced by 250 ms and waits for IME composition to finish; Enter applies it immediately. Collection titles and logical names are listed without opening a schema inspector. Closing returns focus to its trigger. Loading, empty search, recoverable failure and denied-access states remain inside the dialog.
87
93
 
94
+ ## Static association reuse and waiting feedback
95
+
96
+ Each application service retains at most one compiled association result for 60 seconds. Every new collection validates the files read and the directories used for resolution, including missing alternatives and inherited local alias declarations; changes to application identity, plugin registrations, versions, roots, files or build manifests discard the result. Unreadable evidence is retried on the next collection, without automatic retry requests. TypeScript/TSX source checkouts continue parsing on collection. Entries are bounded to 4,096 filesystem paths, one MB each of path text, registration identity and serialized result; no source text or AST is retained. Oversized or unstable snapshots are not cached. Files beyond the existing parser size limit stay unknown; their metadata remains validated so a smaller replacement is analyzed. Each cache hit costs one metadata check per tracked path; the normal 30-second overview cache needs no additional check. Restarting the service discards this independent in-memory entry.
97
+
98
+ This reuse affects static dependencies only. Dynamic statistics, reliable history, observation dates, read limits, timeouts and unrestricted authorization keep their existing behavior. There are no additional business queries, writes, warm-up jobs or refresh requests. Cold analysis still takes time. The initial page shows an accessible collecting placeholder with no invented counts; Refresh keeps existing content and dates until the next result, and confirmed counts do not animate from zero again.
99
+
88
100
  ### Overlapping API routes
89
101
 
90
102
  API associations follow proven Hono registration order, including fluent calls, local registration helpers, ordered API exports and nested mount snapshots. Each matching handler contributes separately. A handler that does not use its `next` parameter ends the chain; a direct unconditional `next()` or `await next()` allows the next matching handler to contribute. Method-specific routes, `all` and `use` middleware retain their chain boundaries. Reached handlers still supply static integration references, including conditional work inside them; these references do not claim that every dependency executes on every request.
91
103
 
92
104
  Conditional forwarding, opaque middleware factories, uncertain registration paths or order, and request paths that cannot distinguish fixed siblings remain conservative. Keep the proven prefix and other page, access and request evidence, omit downstream contributions whose reachability is unproven, and mark the analysis incomplete. Blank matrix cells remain “not identified”. This is bounded package-local analysis, not a general control-flow interpreter; it never executes application business code.
93
105
 
94
- To apply a correction to an existing deployment, update the consuming application's Foundation dependency, rebuild the application to regenerate `dist/server/foundation-modules.json`, and deploy that build. The artifact format remains compatible and can be read without business source files. Refreshing an old artifact alone cannot apply the correction; do not hand-edit it.
106
+ To apply a correction to an existing deployment, update the consuming application's Foundation dependency, rebuild the application to regenerate `dist/server/foundation-modules.json`, and deploy that build. The updated runtime reads earlier version-1 artifacts and can read the rebuilt evidence without business source files. Update the runtime and CLI together before rebuilding. Refreshing an old artifact alone cannot apply the correction; do not hand-edit it.
95
107
 
96
108
  Registration tracing stops at direct returns and loop exits. A possible exit in unsupported control flow makes later registrations uncertain, instead of treating the remaining statements or loop iterations as unconditional. Class definitions do not execute instance fields or methods; static initializers remain module initialization, and recognized instance construction stays conservative. Only terminal wildcards establish a certain wildcard match. A fixed suffix can disprove a nonterminal wildcard match; other suffix patterns remain incomplete and cannot contribute certain associations.
97
109
 
110
+ ### Proven normal-success API paths
111
+
112
+ The matrix also includes dependencies proven on a normal successful request. This is a limited contract-based analysis: an inline `defineApiRoutes` callback may have one `!app.container.has(databaseManagerToken)` early return followed by a final return of the same router/child mount and literal prefix. Only the database-available side contributes this evidence, with its condition retained. Here availability means the database manager token is registered, not that a connectivity probe succeeded. Before the guard, only local router construction and the framework error adapter are supported. Arbitrary setup, conditions and additional exits remain uncertain. A service constructor alone never establishes a dependency; the matched handler must reference its database work.
113
+
114
+ Named value imports identify the supported framework middleware only when the existing resolver confirms an external import. A resolved local override or a matching local alias declaration whose target cannot be confirmed never inherits the external framework contract; ordinary local analysis and unknown-path barriers still apply. This provenance check also covers router factories, constructors, error adapters and service tokens. The supported middleware are: authentication resolved from `authenticationToken` with `required()` and no custom options, `bodyLimit`, `describeRoute`, and two-argument `apiValidator` with a literal supported target. The normal-success conditions are database availability, accepted authentication, an accepted body size and successful input validation. Rejection callbacks do not supply downstream success dependencies. Unknown middleware, earlier terminating handlers, dead registrations and method/path mismatches remain barriers. `defineRootRoutes` contributions belong outside `/api`; unknown contribution factories are still barriers.
115
+
116
+ `moduleSources.routes[].apiEvidence` records the request method and matched API route pattern, providers and symbolic condition sources. An empty condition list distinguishes a proven unconditional prefix; conditional references still appear in `apiProviders` and are explained as successful API requests in the matrix details. These are integration references, not execution counts or a promise that rejected requests access the database. The API schema and version-1 build artifact both carry this additive metadata; older artifacts without it remain readable. Rebuild the application with the updated plugin to preserve conditions in source-free deployments. Static cache validation, dynamic collection, timestamps and unrestricted access keep their existing behavior; no new queries, requests or background work are added.
117
+
98
118
  ### Declared local aliases and finite route constructors
99
119
 
100
120
  Static discovery reads package-local `tsconfig.json` JSONC `compilerOptions.paths`, including exact keys and single-wildcard keys with one target, relative to the declaring configuration when no explicit `baseUrl` is inherited or declared. A parent configuration without `baseUrl` does not change the directory for a child configuration’s own paths. Relative package-local configuration inheritance is limited to eight files; each configuration is limited to 512 KB. Explicit mappings in a configuration with an external preset are usable, but external presets are never loaded and their inherited mappings are unavailable. Package imports (`#...`) and relative imports retain their existing behavior. Each application and registered plugin uses its own configuration; `@/` is never implicitly mapped to `client`, and ordinary npm scopes remain external packages. Vite configurations and configuration plugins are never executed or inferred.