@_tc/template-core 0.3.1 → 0.4.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.
Files changed (1361) hide show
  1. package/.skills/tc-component-usage-skills/SKILL.md +46 -121
  2. package/.skills/tc-component-usage-skills/reference/component-api.md +31 -25
  3. package/.skills/tc-component-usage-skills/reference/examples.md +30 -12
  4. package/.skills/tc-component-usage-skills/reference/patterns.md +45 -27
  5. package/.skills/tc-component-usage-skills/reference/template-core-frontend.md +27 -9
  6. package/.skills/tc-generator/SKILL.md +51 -69
  7. package/.skills/tc-generator/reference/example.md +150 -99
  8. package/.skills/tc-generator/reference/model-schema.md +4 -4
  9. package/.skills/tc-generator/reference/project-template/backend/business.module.ts +9 -0
  10. package/.skills/tc-generator/reference/project-template/backend/product.controller.ts +71 -0
  11. package/.skills/tc-generator/reference/project-template/backend/product.service.ts +58 -0
  12. package/.skills/tc-generator/reference/project-template/backend/product.types.ts +15 -0
  13. package/.skills/tc-generator/reference/project-template/index.js +32 -13
  14. package/.skills/tc-generator/reference/project-template/package.json +20 -3
  15. package/.skills/tc-generator/reference/project-template/scripts/build-backend.mjs +12 -0
  16. package/.skills/tc-generator/reference/project-template/scripts/build-frontend.mjs +7 -0
  17. package/.skills/tc-generator/reference/project-template/scripts/build-ssr.mjs +7 -0
  18. package/.skills/tc-generator/reference/project-template/ssr/apps/hello/hello.entry.tsx +39 -0
  19. package/.skills/tc-generator/reference/project-template/tsconfig.json +14 -0
  20. package/.skills/tc-generator/reference/runtime-extensions.md +132 -89
  21. package/AGENT_README.md +62 -155
  22. package/CHANGE.md +5 -12
  23. package/README.md +237 -360
  24. package/cjs/app/ai/agent/agent-scanner.service.js +1 -0
  25. package/cjs/app/ai/agent/agent.module.js +1 -0
  26. package/cjs/app/ai/ai-config.module.js +1 -0
  27. package/cjs/app/ai/ai-config.service.js +1 -0
  28. package/cjs/app/ai/ai.controller.js +1 -0
  29. package/cjs/app/ai/ai.module.js +1 -0
  30. package/cjs/app/ai/declaration-paths.js +1 -0
  31. package/cjs/app/ai/eval/assertions.js +1 -0
  32. package/cjs/app/ai/guardrail/guardrail.module.js +1 -0
  33. package/cjs/app/ai/guardrail/guardrail.service.js +1 -0
  34. package/cjs/app/ai/guardrail/internal/load-guardrail-config.js +1 -0
  35. package/cjs/app/ai/mcp/internal/load-mcp-config.js +1 -0
  36. package/cjs/app/ai/mcp/mcp-registry.service.js +2 -0
  37. package/cjs/app/ai/mcp/mcp.client.js +4 -0
  38. package/cjs/app/ai/mcp/mcp.loader.js +1 -0
  39. package/cjs/app/ai/mcp/mcp.module.js +1 -0
  40. package/cjs/app/ai/mcp/mcp.types.js +1 -0
  41. package/cjs/app/ai/memory/checkpoint.service.js +1 -0
  42. package/cjs/app/ai/memory/internal/load-memory-config.js +1 -0
  43. package/cjs/app/ai/memory/memory.module.js +1 -0
  44. package/cjs/app/ai/memory/thread.service.js +1 -0
  45. package/cjs/app/ai/rag/chunker.js +2 -0
  46. package/cjs/app/ai/rag/internal/load-embedding-config.js +1 -0
  47. package/cjs/app/ai/rag/internal/load-rag-config.js +1 -0
  48. package/cjs/app/ai/rag/rag.interface.js +1 -0
  49. package/cjs/app/ai/rag/rag.module.js +1 -0
  50. package/cjs/app/ai/rag/retriever.service.js +1 -0
  51. package/cjs/app/ai/retention/conversation-retention.service.js +1 -0
  52. package/cjs/app/ai/retention/retention-policy.js +1 -0
  53. package/cjs/app/ai/runtime/ai-runtime-startup.validator.js +1 -0
  54. package/cjs/app/ai/runtime/internal/agent-run-context.js +1 -0
  55. package/cjs/app/ai/runtime/internal/compact-tool-result.js +1 -0
  56. package/cjs/app/ai/runtime/internal/context-compaction.service.js +4 -0
  57. package/cjs/app/ai/runtime/internal/load-llm-config.js +1 -0
  58. package/cjs/app/ai/runtime/internal/load-runtime-config.js +1 -0
  59. package/cjs/app/ai/runtime/internal/request-budget.js +1 -0
  60. package/cjs/app/ai/runtime/internal/run-event-queue.js +1 -0
  61. package/cjs/app/ai/runtime/langchain/langchain-planner.service.js +1 -0
  62. package/cjs/app/ai/runtime/langchain/skill-tool.adapter.js +1 -0
  63. package/cjs/app/ai/runtime/langgraph/agent.graph.js +1 -0
  64. package/cjs/app/ai/runtime/langgraph/agent.state.js +1 -0
  65. package/cjs/app/ai/runtime/langgraph/langgraph-orchestrator.service.js +1 -0
  66. package/cjs/app/ai/runtime/runtime.module.js +1 -0
  67. package/cjs/app/ai/runtime/thread-execution-coordinator.js +1 -0
  68. package/cjs/app/ai/skill/skill-scanner.service.js +1 -0
  69. package/cjs/app/ai/skill/skill.module.js +1 -0
  70. package/cjs/app/ai/store/internal/archive-id.js +1 -0
  71. package/cjs/app/ai/store/internal/load-store-config.js +1 -0
  72. package/cjs/app/ai/store/internal/load-thread-state-store.js +1 -0
  73. package/cjs/app/ai/store/reference/file-memory.store.js +1 -0
  74. package/cjs/app/ai/store/reference/file-trace.store.js +1 -0
  75. package/cjs/app/ai/store/reference/file-vector.store.js +1 -0
  76. package/cjs/app/ai/store/reference/qdrant-vector.store.js +1 -0
  77. package/cjs/app/ai/store/store.interface.js +1 -0
  78. package/cjs/app/ai/store/store.module.js +1 -0
  79. package/cjs/app/ai/tool/builtin/index.js +1 -0
  80. package/cjs/app/ai/tool/builtin/invoke-agent.tool.js +1 -0
  81. package/cjs/app/ai/tool/builtin/retrieve.tool.js +1 -0
  82. package/cjs/app/ai/tool/executor.service.js +1 -0
  83. package/cjs/app/ai/tool/tool-registry.service.js +1 -0
  84. package/cjs/app/ai/tool/tool.module.js +1 -0
  85. package/cjs/app/ai/trace/trace.service.js +1 -0
  86. package/cjs/app/csr/controller.js +1 -0
  87. package/cjs/app/extends/$fetch.js +1 -1
  88. package/cjs/app/extends/crypto.js +1 -1
  89. package/cjs/app/extends/db.js +4 -4
  90. package/cjs/app/extends/logger.js +1 -1
  91. package/cjs/app/frontend-development.js +1 -0
  92. package/cjs/app/html/browser-options.js +1 -0
  93. package/cjs/app/http/body-parser.middleware.js +1 -0
  94. package/cjs/app/http/compression.middleware.js +1 -0
  95. package/cjs/app/http/context.js +1 -0
  96. package/cjs/app/http/controller.js +1 -0
  97. package/cjs/app/http/error-response.js +1 -0
  98. package/cjs/app/http/errors.js +1 -0
  99. package/cjs/app/http/exception-filter.js +1 -0
  100. package/cjs/app/http/request-data.js +1 -0
  101. package/cjs/app/http/request-schema.pipe.js +1 -0
  102. package/cjs/app/http/response.interceptor.js +1 -0
  103. package/cjs/app/http/response.js +1 -0
  104. package/cjs/app/http/security.guard.js +1 -0
  105. package/cjs/app/project/controller.js +1 -0
  106. package/cjs/app/project/service.js +1 -0
  107. package/cjs/app/providers/csr.js +1 -0
  108. package/cjs/app/providers/foundation.js +1 -0
  109. package/cjs/app/ssr/artifacts.js +1 -0
  110. package/cjs/app/ssr/controller.js +1 -0
  111. package/cjs/app/ssr/html.js +14 -6
  112. package/cjs/app/ssr/manifest.js +2 -2
  113. package/cjs/app/ssr/session.js +1 -0
  114. package/cjs/app/ssr/stream.js +1 -0
  115. package/cjs/app/ssr/streaming-request-cache.js +1 -0
  116. package/cjs/app/static-assets.middleware.js +1 -0
  117. package/cjs/app/template-core.module.js +1 -0
  118. package/cjs/bundler/buildBE.js +1 -1
  119. package/cjs/bundler/buildFE.js +1 -1
  120. package/cjs/bundler/buildSSR.js +1 -1
  121. package/cjs/bundler/dev-session.js +1 -0
  122. package/cjs/bundler/dev.js +1 -1
  123. package/cjs/bundler/feSharedConfig.js +1 -1
  124. package/cjs/bundler/index.js +1 -1
  125. package/cjs/bundler/prod.js +1 -1
  126. package/cjs/bundler/ssrClientManifest.js +1 -1
  127. package/cjs/bundler/ssrEntries.js +1 -1
  128. package/cjs/bundler/state.js +1 -1
  129. package/cjs/bundler/utils.js +3 -3
  130. package/cjs/index.js +1 -1
  131. package/cjs/package.json +1 -0
  132. package/cjs/packages/common/index.js +1 -1
  133. package/cjs/packages/common/ssr/hydration.js +1 -1
  134. package/cjs/packages/common/ssr/index.js +1 -1
  135. package/cjs/packages/core/bootstrap.js +1 -0
  136. package/cjs/packages/core/config-service.js +1 -0
  137. package/cjs/packages/core/duplicate-route-checking-adapter.js +1 -0
  138. package/cjs/packages/core/index.js +1 -1
  139. package/cjs/packages/core/legacy-factory-diagnostics.js +1 -0
  140. package/cjs/packages/core/loader/model.js +1 -1
  141. package/cjs/packages/core/paths.js +1 -1
  142. package/cjs/packages/core/resource-lifecycle.js +1 -0
  143. package/cjs/packages/core/startup.js +1 -0
  144. package/cjs/packages/core/tokens.js +1 -0
  145. package/cjs/packages/utils/runFileFn.js +1 -1
  146. package/cjs/scripts/vite-build/build.js +2 -1
  147. package/esm/app/ai/agent/agent-scanner.service.js +91 -0
  148. package/esm/app/ai/agent/agent.module.js +11 -0
  149. package/esm/app/ai/ai-config.module.js +17 -0
  150. package/esm/app/ai/ai-config.service.js +38 -0
  151. package/esm/app/ai/ai.controller.js +162 -0
  152. package/esm/app/ai/ai.module.js +48 -0
  153. package/esm/app/ai/contracts/index.js +0 -0
  154. package/esm/app/ai/declaration-paths.js +28 -0
  155. package/esm/app/ai/eval/assertions.js +49 -0
  156. package/esm/app/ai/guardrail/guardrail.interface.js +0 -0
  157. package/esm/app/ai/guardrail/guardrail.module.js +11 -0
  158. package/esm/app/ai/guardrail/guardrail.service.js +35 -0
  159. package/esm/app/ai/guardrail/internal/load-guardrail-config.js +17 -0
  160. package/esm/app/ai/mcp/internal/load-mcp-config.js +50 -0
  161. package/esm/app/ai/mcp/mcp-registry.service.js +25 -0
  162. package/esm/app/ai/mcp/mcp.client.js +199 -0
  163. package/esm/app/ai/mcp/mcp.loader.js +63 -0
  164. package/esm/app/ai/mcp/mcp.module.js +30 -0
  165. package/esm/app/ai/mcp/mcp.types.js +4 -0
  166. package/esm/app/ai/memory/checkpoint.service.js +89 -0
  167. package/esm/app/ai/memory/internal/load-memory-config.js +15 -0
  168. package/esm/app/ai/memory/memory.module.js +14 -0
  169. package/esm/app/ai/memory/thread.service.js +80 -0
  170. package/esm/app/ai/rag/chunker.js +23 -0
  171. package/esm/app/ai/rag/internal/load-embedding-config.js +44 -0
  172. package/esm/app/ai/rag/internal/load-rag-config.js +35 -0
  173. package/esm/app/ai/rag/rag.interface.js +4 -0
  174. package/esm/app/ai/rag/rag.module.js +21 -0
  175. package/esm/app/ai/rag/retriever.service.js +79 -0
  176. package/esm/app/ai/retention/conversation-retention.service.js +66 -0
  177. package/esm/app/ai/retention/retention-policy.js +14 -0
  178. package/esm/app/ai/runtime/ai-runtime-startup.validator.js +32 -0
  179. package/esm/app/ai/runtime/internal/agent-run-context.js +5 -0
  180. package/esm/app/ai/runtime/internal/compact-tool-result.js +94 -0
  181. package/esm/app/ai/runtime/internal/context-compaction.service.js +352 -0
  182. package/esm/app/ai/runtime/internal/load-llm-config.js +52 -0
  183. package/esm/app/ai/runtime/internal/load-runtime-config.js +12 -0
  184. package/esm/app/ai/runtime/internal/request-budget.js +152 -0
  185. package/esm/app/ai/runtime/internal/run-event-queue.js +23 -0
  186. package/esm/app/ai/runtime/langchain/langchain-planner.service.js +195 -0
  187. package/esm/app/ai/runtime/langchain/skill-tool.adapter.js +29 -0
  188. package/esm/app/ai/runtime/langgraph/agent.graph.js +157 -0
  189. package/esm/app/ai/runtime/langgraph/agent.state.js +37 -0
  190. package/esm/app/ai/runtime/langgraph/langgraph-orchestrator.service.js +356 -0
  191. package/esm/app/ai/runtime/runtime.module.js +44 -0
  192. package/esm/app/ai/runtime/thread-execution-coordinator.js +27 -0
  193. package/esm/app/ai/skill/skill-scanner.service.js +71 -0
  194. package/esm/app/ai/skill/skill.interface.js +0 -0
  195. package/esm/app/ai/skill/skill.module.js +11 -0
  196. package/esm/app/ai/store/internal/archive-id.js +11 -0
  197. package/esm/app/ai/store/internal/load-store-config.js +27 -0
  198. package/esm/app/ai/store/internal/load-thread-state-store.js +17 -0
  199. package/esm/app/ai/store/reference/file-memory.store.js +279 -0
  200. package/esm/app/ai/store/reference/file-trace.store.js +44 -0
  201. package/esm/app/ai/store/reference/file-vector.store.js +41 -0
  202. package/esm/app/ai/store/reference/qdrant-vector.store.js +65 -0
  203. package/esm/app/ai/store/store.interface.js +4 -0
  204. package/esm/app/ai/store/store.module.js +40 -0
  205. package/esm/app/ai/tool/builtin/index.js +6 -0
  206. package/esm/app/ai/tool/builtin/invoke-agent.tool.js +86 -0
  207. package/esm/app/ai/tool/builtin/retrieve.tool.js +31 -0
  208. package/esm/app/ai/tool/executor.service.js +78 -0
  209. package/esm/app/ai/tool/tool-registry.service.js +33 -0
  210. package/esm/app/ai/tool/tool.interface.js +0 -0
  211. package/esm/app/ai/tool/tool.module.js +14 -0
  212. package/esm/app/ai/trace/trace.service.js +93 -0
  213. package/esm/app/csr/controller.js +136 -0
  214. package/esm/app/extends/$fetch.js +6 -6
  215. package/esm/app/extends/crypto.js +4 -3
  216. package/esm/app/extends/db.js +65 -65
  217. package/esm/app/extends/logger.js +73 -12
  218. package/esm/app/frontend-development.js +24 -0
  219. package/esm/app/html/browser-options.js +7 -0
  220. package/esm/app/http/body-parser.middleware.js +53 -0
  221. package/esm/app/http/compression.middleware.js +13 -0
  222. package/esm/app/http/context.js +21 -0
  223. package/esm/app/http/controller.js +9 -0
  224. package/esm/app/http/error-response.js +36 -0
  225. package/esm/app/http/errors.js +24 -0
  226. package/esm/app/http/exception-filter.js +52 -0
  227. package/esm/app/http/request-data.js +17 -0
  228. package/esm/app/http/request-schema.pipe.js +40 -0
  229. package/esm/app/http/response.interceptor.js +26 -0
  230. package/esm/app/http/response.js +23 -0
  231. package/esm/app/http/security.guard.js +51 -0
  232. package/esm/app/project/controller.js +81 -0
  233. package/esm/app/project/service.js +35 -0
  234. package/esm/app/providers/csr.js +65 -0
  235. package/esm/app/providers/foundation.js +158 -0
  236. package/esm/app/ssr/artifacts.js +66 -0
  237. package/esm/app/ssr/controller.js +120 -0
  238. package/esm/app/ssr/html.js +55 -46
  239. package/esm/app/ssr/manifest.js +24 -10
  240. package/esm/app/ssr/session.js +91 -0
  241. package/esm/app/ssr/stream.js +50 -0
  242. package/esm/app/ssr/streaming-request-cache.js +30 -0
  243. package/esm/app/ssr/types.js +0 -0
  244. package/esm/app/static-assets.middleware.js +68 -0
  245. package/esm/app/template-core.module.js +92 -0
  246. package/esm/bundler/buildBE.js +1 -0
  247. package/esm/bundler/buildFE.js +11 -11
  248. package/esm/bundler/buildSSR.js +60 -62
  249. package/esm/bundler/dev-session.js +145 -0
  250. package/esm/bundler/dev.js +8 -9
  251. package/esm/bundler/feSharedConfig.js +66 -36
  252. package/esm/bundler/index.js +2 -1
  253. package/esm/bundler/prod.js +7 -11
  254. package/esm/bundler/ssrClientManifest.js +5 -5
  255. package/esm/bundler/ssrEntries.js +5 -5
  256. package/esm/bundler/state.js +5 -7
  257. package/esm/bundler/utils.js +170 -148
  258. package/esm/index.js +29 -12
  259. package/esm/package.json +1 -0
  260. package/esm/packages/common/index.js +12 -12
  261. package/esm/packages/common/ssr/hydration.js +1 -1
  262. package/esm/packages/common/ssr/index.js +13 -13
  263. package/esm/packages/core/bootstrap.js +82 -0
  264. package/esm/packages/core/config-service.js +46 -0
  265. package/esm/packages/core/duplicate-route-checking-adapter.js +106 -0
  266. package/esm/packages/core/index.js +7 -60
  267. package/esm/packages/core/legacy-factory-diagnostics.js +74 -0
  268. package/esm/packages/core/loader/model.js +6 -1
  269. package/esm/packages/core/paths.js +5 -11
  270. package/esm/packages/core/resource-lifecycle.js +83 -0
  271. package/esm/packages/core/startup.js +233 -0
  272. package/esm/packages/core/tokens.js +4 -0
  273. package/esm/packages/utils/runFileFn.js +19 -35
  274. package/esm/scripts/vite-build/build.js +29 -22
  275. package/fe/frontend/apps/dash/Dashboard.js +3 -3
  276. package/fe/frontend/apps/ui-components/UiComponentsPreview.d.ts +2 -0
  277. package/fe/frontend/apps/ui-components/UiComponentsPreview.js +182 -0
  278. package/fe/frontend/apps/ui-components/index.d.ts +1 -2
  279. package/fe/frontend/apps/ui-components/index.js +2 -8
  280. package/fe/frontend/apps/ui-components/ui-components.entry.js +3 -2
  281. package/fe/frontend/src/common/fetchErrorShow.js +1 -1
  282. package/fe/frontend/src/common/importComponent.js +1 -1
  283. package/fe/frontend/src/common/language.d.ts +1 -1
  284. package/fe/frontend/src/common/language.js +2 -2
  285. package/fe/frontend/src/common/request.d.ts +2 -0
  286. package/fe/frontend/src/common/request.js +14 -3
  287. package/fe/frontend/src/common/schemaForm.js +2 -2
  288. package/fe/frontend/src/components/AsyncSelect/AsyncSelect.d.ts +2 -2
  289. package/fe/frontend/src/components/AsyncSelect/AsyncSelect.js +3 -3
  290. package/fe/frontend/src/components/BasePage/HeaderView.js +1 -2
  291. package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.d.ts +1 -1
  292. package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.js +7 -7
  293. package/fe/frontend/src/components/ThemeSwitch/ThemeSwitch.js +14 -8
  294. package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.js +3 -3
  295. package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.js +7 -6
  296. package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaSearch/index.js +2 -2
  297. package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/PreviewImage.d.ts +1 -1
  298. package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/PreviewImage.js +1 -1
  299. package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/index.js +7 -7
  300. package/fe/frontend/src/defaultPages/SchemaPage/index.js +2 -2
  301. package/fe/frontend/src/defaultPages/SidebarSlotPage/SidebarSlotContainer.js +2 -2
  302. package/fe/frontend/src/hooks/useText.d.ts +1 -1
  303. package/fe/frontend/src/hooks/useText.js +2 -2
  304. package/fe/frontend/src/index.d.ts +4 -4
  305. package/fe/frontend/src/index.js +4 -4
  306. package/fe/frontend/src/language/resources.d.ts +1 -1
  307. package/fe/frontend/src/main.css +1 -1
  308. package/fe/frontend/src/stores/apiFreezer.d.ts +1 -1
  309. package/fe/frontend/src/stores/apiFreezer.js +2 -2
  310. package/fe/frontend/src/stores/mode.js +1 -2
  311. package/fe/frontend/src/stores/schemaStore.d.ts +2 -2
  312. package/fe/frontend/src/stores/schemaStore.js +1 -2
  313. package/fe/frontend/src/typing/scalability.d.ts +2 -2
  314. package/fe/models/types/data/button.d.ts +1 -1
  315. package/fe/models/types/data/component.d.ts +1 -1
  316. package/fe/models/types/data/schema.d.ts +1 -1
  317. package/fe/models/types/data/search.d.ts +1 -1
  318. package/fe/packages/common/index.js +6 -6
  319. package/fe/packages/common/ssr/hydration.d.ts +2 -0
  320. package/fe/packages/common/ssr/hydration.js +1 -1
  321. package/fe/packages/common/ssr/index.js +2 -2
  322. package/fe/packages/react/core/Button/Button.js +88 -0
  323. package/fe/packages/react/core/Button/SubmitButton.d.ts +8 -0
  324. package/fe/packages/react/core/Button/SubmitButton.js +31 -0
  325. package/fe/packages/react/core/Button/index.js +3 -0
  326. package/fe/packages/react/core/Card/Card.js +31 -0
  327. package/fe/packages/react/core/Card/index.js +2 -0
  328. package/fe/packages/react/core/Checkbox/Checkbox.js +52 -0
  329. package/fe/packages/react/core/Checkbox/index.js +2 -0
  330. package/fe/packages/react/core/Label/Label.js +58 -0
  331. package/fe/packages/react/core/Label/index.js +2 -0
  332. package/fe/packages/react/core/Layout/Layout.js +33 -0
  333. package/fe/packages/react/core/Layout/index.js +2 -0
  334. package/fe/packages/react/core/Loading/Loading.js +48 -0
  335. package/fe/packages/react/core/Loading/index.js +2 -0
  336. package/fe/packages/react/core/Skeleton/Skeleton.js +101 -0
  337. package/fe/packages/react/core/Skeleton/index.js +2 -0
  338. package/fe/packages/react/core/breadcrumb/breadcrumb.js +155 -0
  339. package/fe/packages/react/core/breadcrumb/index.js +2 -0
  340. package/fe/packages/react/core/hooks/index.d.ts +12 -0
  341. package/fe/packages/react/core/hooks/index.js +13 -0
  342. package/fe/packages/react/core/hooks/useBreadcrumb.d.ts +9 -0
  343. package/fe/packages/react/core/hooks/useBreadcrumb.js +5 -0
  344. package/fe/packages/react/core/hooks/useDropdownPositioning.js +122 -0
  345. package/fe/packages/react/core/hooks/useExecuteOnce.js +47 -0
  346. package/fe/packages/react/core/hooks/useHydrationData.d.ts +2 -0
  347. package/fe/packages/react/core/hooks/useHydrationData.js +23 -0
  348. package/fe/packages/react/core/hooks/useInit.js +11 -0
  349. package/fe/packages/react/core/hooks/useInputController.js +39 -0
  350. package/fe/packages/react/core/hooks/useLanguage.d.ts +1 -0
  351. package/fe/packages/react/core/hooks/useLanguage.js +8 -0
  352. package/fe/packages/react/core/hooks/usePagination.js +30 -0
  353. package/fe/packages/react/core/hooks/useRefState.js +45 -0
  354. package/fe/packages/react/core/hooks/useSSR.js +46 -0
  355. package/fe/packages/react/core/hooks/useTableState.d.ts +22 -0
  356. package/fe/packages/react/core/hooks/useTableState.js +22 -0
  357. package/fe/packages/react/core/hooks/useWatch.js +60 -0
  358. package/fe/packages/react/core/index.d.ts +12 -0
  359. package/fe/packages/react/core/index.js +37 -0
  360. package/fe/packages/react/core/internal/hydration.d.ts +12 -0
  361. package/fe/packages/react/core/internal/hydration.js +17 -0
  362. package/fe/packages/react/core/internal/i18n/default.d.ts +86 -0
  363. package/fe/packages/react/core/internal/i18n/default.js +96 -0
  364. package/fe/packages/react/core/internal/i18n/en-US.d.ts +86 -0
  365. package/fe/packages/react/core/internal/i18n/en-US.js +96 -0
  366. package/fe/packages/react/core/internal/i18n/index.d.ts +18 -0
  367. package/fe/packages/react/core/internal/i18n/index.js +179 -0
  368. package/fe/packages/react/core/internal/i18n/locales.d.ts +7 -0
  369. package/fe/packages/react/core/internal/i18n/locales.js +18 -0
  370. package/fe/packages/react/core/internal/i18n/types.d.ts +47 -0
  371. package/fe/packages/react/core/internal/i18n/types.js +0 -0
  372. package/fe/packages/react/core/internal/raf-timeout.d.ts +2 -0
  373. package/fe/packages/react/core/internal/raf-timeout.js +54 -0
  374. package/fe/packages/react/core/internal/react19-compat.d.ts +15 -0
  375. package/fe/packages/react/core/internal/react19-compat.js +0 -0
  376. package/fe/packages/react/core/lib/createStoreHook.js +9 -0
  377. package/fe/packages/react/core/lib/dataTableWidth.js +33 -0
  378. package/fe/packages/react/core/lib/export.d.ts +21 -0
  379. package/fe/packages/react/core/lib/export.js +112 -0
  380. package/fe/packages/react/core/lib/index.d.ts +4 -0
  381. package/fe/packages/react/core/lib/index.js +5 -0
  382. package/fe/packages/react/core/lib/utils.d.ts +10 -0
  383. package/fe/packages/react/core/lib/utils.js +64 -0
  384. package/fe/packages/react/core/stores/breadcrumb.d.ts +14 -0
  385. package/fe/packages/react/core/stores/breadcrumb.js +52 -0
  386. package/fe/packages/react/core/stores/index.d.ts +2 -0
  387. package/fe/packages/react/core/stores/index.js +5 -0
  388. package/fe/packages/react/core/stores/language.d.ts +3 -0
  389. package/fe/packages/react/core/stores/language.js +3 -0
  390. package/fe/packages/react/core/types/baseType.js +0 -0
  391. package/fe/packages/react/core/types/index.js +0 -0
  392. package/fe/packages/react/dev/preview/DemoSection.d.ts +12 -0
  393. package/fe/packages/react/dev/preview/demoRegistry.d.ts +8 -0
  394. package/fe/packages/react/dev/preview/demos/core/ButtonDemo.d.ts +3 -0
  395. package/fe/packages/react/dev/preview/demos/forms/InputDemo.d.ts +3 -0
  396. package/fe/packages/react/dev/preview/demos/overlays/ModalDemo.d.ts +3 -0
  397. package/fe/packages/react/dev/preview/index.d.ts +2 -0
  398. package/fe/packages/react/forms/DataTable/ActionBtn.d.ts +7 -0
  399. package/fe/packages/react/forms/DataTable/ActionBtn.js +116 -0
  400. package/fe/packages/react/forms/DataTable/index.d.ts +32 -0
  401. package/fe/packages/react/forms/DataTable/index.js +216 -0
  402. package/fe/packages/react/forms/Date/Calendar.js +351 -0
  403. package/fe/packages/react/forms/Date/Date.js +210 -0
  404. package/fe/packages/react/forms/Date/LocaleContext.js +27 -0
  405. package/fe/packages/react/forms/Date/LocaleProvider.js +22 -0
  406. package/fe/packages/react/forms/Date/TimePicker.js +136 -0
  407. package/fe/packages/react/forms/Date/data.js +7 -0
  408. package/fe/packages/react/forms/Date/dateLocaleStore.js +14 -0
  409. package/fe/packages/react/forms/Date/dropdownPositioning.d.ts +2 -0
  410. package/fe/packages/react/forms/Date/dropdownPositioning.js +12 -0
  411. package/fe/packages/react/forms/Date/index.js +6 -0
  412. package/fe/packages/react/forms/Date/locales.d.ts +30 -0
  413. package/fe/packages/react/forms/Date/locales.js +58 -0
  414. package/fe/packages/react/forms/Form/Form.js +15 -0
  415. package/fe/packages/react/forms/Form/FormItem.d.ts +19 -0
  416. package/fe/packages/react/forms/Form/FormItem.js +60 -0
  417. package/fe/packages/react/forms/Form/SchemaForm/data.d.ts +40 -0
  418. package/fe/packages/react/forms/Form/SchemaForm/data.js +15 -0
  419. package/fe/packages/react/forms/Form/SchemaForm/defaultComponentsMap.js +4 -0
  420. package/fe/packages/react/forms/Form/SchemaForm/index.d.ts +60 -0
  421. package/fe/packages/react/forms/Form/SchemaForm/index.js +119 -0
  422. package/fe/packages/react/forms/Form/index.d.ts +5 -0
  423. package/fe/packages/react/forms/Form/index.js +6 -0
  424. package/fe/packages/react/forms/Input/Input.js +146 -0
  425. package/fe/packages/react/forms/Input/index.js +2 -0
  426. package/fe/packages/react/forms/InputNumber/InputNumber.d.ts +25 -0
  427. package/fe/packages/react/forms/InputNumber/InputNumber.js +207 -0
  428. package/fe/packages/react/forms/InputNumber/index.js +2 -0
  429. package/fe/packages/react/forms/InputNumber/inputNumberUtils.js +45 -0
  430. package/fe/packages/react/forms/Pagination/Pagination.js +115 -0
  431. package/fe/packages/react/forms/Pagination/index.js +2 -0
  432. package/fe/packages/react/forms/Radio/Radio.js +36 -0
  433. package/fe/packages/react/forms/Radio/RadioGroup.js +33 -0
  434. package/fe/packages/react/forms/Radio/index.js +3 -0
  435. package/fe/packages/react/forms/Search/Search.d.ts +13 -0
  436. package/fe/packages/react/forms/Search/Search.js +24 -0
  437. package/fe/packages/react/forms/Search/index.js +2 -0
  438. package/fe/packages/react/forms/Select/Select.js +282 -0
  439. package/fe/packages/react/forms/Select/dropdownPositioning.d.ts +2 -0
  440. package/fe/packages/react/forms/Select/dropdownPositioning.js +16 -0
  441. package/fe/packages/react/forms/Select/index.js +2 -0
  442. package/fe/packages/react/forms/Switch/Switch.js +28 -0
  443. package/fe/packages/react/forms/Switch/index.js +2 -0
  444. package/fe/packages/react/forms/TableSearch/TableSearch.d.ts +30 -0
  445. package/fe/packages/react/forms/TableSearch/TableSearch.js +154 -0
  446. package/fe/packages/react/forms/TableSearch/index.js +2 -0
  447. package/fe/packages/react/forms/TableSearch/lang.d.ts +16 -0
  448. package/fe/packages/react/forms/TableSearch/lang.js +25 -0
  449. package/fe/packages/react/forms/TableSearch/tableSearchLocaleStore.js +10 -0
  450. package/fe/packages/react/forms/Textarea/Textarea.js +58 -0
  451. package/fe/packages/react/forms/Textarea/index.js +2 -0
  452. package/fe/packages/react/forms/TreeSelect/TreeSelect.js +190 -0
  453. package/fe/packages/react/forms/TreeSelect/index.js +2 -0
  454. package/fe/packages/react/forms/Upload/ImageUpload.js +101 -0
  455. package/fe/packages/react/forms/Upload/Upload.js +29 -0
  456. package/fe/packages/react/forms/Upload/index.js +3 -0
  457. package/fe/packages/react/forms/index.d.ts +15 -0
  458. package/fe/packages/react/forms/index.js +41 -0
  459. package/fe/packages/react/forms/table/index.js +2 -0
  460. package/fe/packages/react/forms/table/table.js +166 -0
  461. package/fe/packages/react/i18n/I18nContext.d.ts +6 -0
  462. package/fe/packages/react/i18n/I18nContext.js +5 -0
  463. package/fe/packages/react/i18n/I18nProvider.d.ts +6 -0
  464. package/fe/packages/react/i18n/I18nProvider.js +19 -0
  465. package/fe/packages/react/i18n/getUiReactLocale.d.ts +176 -0
  466. package/fe/packages/react/i18n/getUiReactLocale.js +13 -0
  467. package/fe/packages/react/i18n/index.d.ts +5 -0
  468. package/fe/packages/react/i18n/index.js +7 -0
  469. package/fe/packages/react/i18n/legacy.d.ts +9 -0
  470. package/fe/packages/react/i18n/legacy.js +12 -0
  471. package/fe/packages/react/i18n/locales/en-US.d.ts +1 -0
  472. package/fe/packages/react/i18n/locales/en-US.js +2 -0
  473. package/fe/packages/react/i18n/locales/zh-CN.d.ts +1 -0
  474. package/fe/packages/react/i18n/locales/zh-CN.js +2 -0
  475. package/fe/packages/react/i18n/useI18n.d.ts +2 -0
  476. package/fe/packages/react/i18n/useI18n.js +15 -0
  477. package/fe/packages/react/i18n/useI18nState.d.ts +3 -0
  478. package/fe/packages/react/i18n/useI18nState.js +24 -0
  479. package/fe/packages/react/index.d.ts +6 -0
  480. package/fe/packages/react/index.js +80 -0
  481. package/fe/packages/react/overlays/Dialog/ConfirmDialog.js +41 -0
  482. package/fe/packages/react/overlays/Dialog/index.js +2 -0
  483. package/fe/packages/react/overlays/Drawer/Drawer.js +151 -0
  484. package/fe/packages/react/overlays/Drawer/index.js +2 -0
  485. package/fe/packages/react/overlays/Dropdown/Dropdown.d.ts +24 -0
  486. package/fe/packages/react/overlays/Dropdown/Dropdown.js +105 -0
  487. package/fe/packages/react/overlays/Dropdown/index.js +2 -0
  488. package/fe/packages/react/overlays/DropdownMenu/Menu.js +147 -0
  489. package/fe/packages/react/overlays/DropdownMenu/MenuContext.js +88 -0
  490. package/fe/packages/react/overlays/DropdownMenu/MenuItem.js +78 -0
  491. package/fe/packages/react/overlays/DropdownMenu/SubMenu.js +207 -0
  492. package/fe/packages/react/overlays/DropdownMenu/index.js +5 -0
  493. package/fe/packages/react/overlays/DropdownMenu/menuTypes.js +0 -0
  494. package/fe/packages/react/overlays/DropdownMenu/utils.js +8 -0
  495. package/fe/packages/react/overlays/Message/Message.js +76 -0
  496. package/fe/packages/react/overlays/Message/MessageManager.js +104 -0
  497. package/fe/packages/react/overlays/Message/data.js +4 -0
  498. package/fe/packages/react/overlays/Message/index.js +2 -0
  499. package/fe/packages/react/overlays/Modal/Modal.js +59 -0
  500. package/fe/packages/react/overlays/Modal/ModalManager.d.ts +46 -0
  501. package/fe/packages/react/overlays/Modal/ModalManager.js +106 -0
  502. package/fe/packages/react/overlays/Modal/index.js +3 -0
  503. package/fe/packages/react/overlays/Overlay/Overlay.js +61 -0
  504. package/fe/packages/react/overlays/Overlay/index.js +2 -0
  505. package/fe/packages/react/overlays/Popover/Notification.js +56 -0
  506. package/fe/packages/react/overlays/Popover/index.js +2 -0
  507. package/fe/packages/react/overlays/Popup/Popup.d.ts +25 -0
  508. package/fe/packages/react/overlays/Popup/Popup.js +91 -0
  509. package/fe/packages/react/overlays/Popup/index.js +2 -0
  510. package/fe/packages/react/overlays/Tooltip/Tooltip.js +88 -0
  511. package/fe/packages/react/overlays/Tooltip/index.js +2 -0
  512. package/fe/packages/react/overlays/index.d.ts +10 -0
  513. package/fe/packages/react/overlays/index.js +25 -0
  514. package/fe/packages/react/styles.css +299 -0
  515. package/fe/packages/react/ui/components/Button/index.d.ts +1 -3
  516. package/fe/packages/react/ui/components/Button/index.js +3 -2
  517. package/fe/packages/react/ui/components/Card/index.d.ts +1 -1
  518. package/fe/packages/react/ui/components/Card/index.js +2 -1
  519. package/fe/packages/react/ui/components/Checkbox/index.d.ts +1 -1
  520. package/fe/packages/react/ui/components/Checkbox/index.js +2 -1
  521. package/fe/packages/react/ui/components/ConfirmDialog/index.d.ts +1 -1
  522. package/fe/packages/react/ui/components/ConfirmDialog/index.js +2 -1
  523. package/fe/packages/react/ui/components/DataTable/index.d.ts +1 -32
  524. package/fe/packages/react/ui/components/DataTable/index.js +2 -215
  525. package/fe/packages/react/ui/components/Date/index.d.ts +1 -5
  526. package/fe/packages/react/ui/components/Date/index.js +6 -5
  527. package/fe/packages/react/ui/components/Drawer/index.d.ts +1 -2
  528. package/fe/packages/react/ui/components/Drawer/index.js +2 -1
  529. package/fe/packages/react/ui/components/Dropdown/index.d.ts +1 -1
  530. package/fe/packages/react/ui/components/Dropdown/index.js +2 -1
  531. package/fe/packages/react/ui/components/Form/index.d.ts +1 -4
  532. package/fe/packages/react/ui/components/Form/index.js +6 -5
  533. package/fe/packages/react/ui/components/ImagePreview/ImagePreview.js +9 -5
  534. package/fe/packages/react/ui/components/ImagePreview/PreviewImage.d.ts +1 -1
  535. package/fe/packages/react/ui/components/ImagePreview/PreviewImage.js +4 -4
  536. package/fe/packages/react/ui/components/Input/index.d.ts +1 -1
  537. package/fe/packages/react/ui/components/Input/index.js +2 -1
  538. package/fe/packages/react/ui/components/InputNumber/index.d.ts +1 -1
  539. package/fe/packages/react/ui/components/InputNumber/index.js +2 -1
  540. package/fe/packages/react/ui/components/Label/index.d.ts +1 -2
  541. package/fe/packages/react/ui/components/Label/index.js +3 -2
  542. package/fe/packages/react/ui/components/Layout/index.d.ts +1 -1
  543. package/fe/packages/react/ui/components/Layout/index.js +2 -1
  544. package/fe/packages/react/ui/components/Loading/index.d.ts +1 -1
  545. package/fe/packages/react/ui/components/Loading/index.js +2 -1
  546. package/fe/packages/react/ui/components/Menu/index.d.ts +1 -8
  547. package/fe/packages/react/ui/components/Menu/index.js +5 -4
  548. package/fe/packages/react/ui/components/Message/index.d.ts +1 -2
  549. package/fe/packages/react/ui/components/Message/index.js +2 -1
  550. package/fe/packages/react/ui/components/Modal/index.d.ts +1 -3
  551. package/fe/packages/react/ui/components/Modal/index.js +3 -2
  552. package/fe/packages/react/ui/components/Notification/index.d.ts +1 -1
  553. package/fe/packages/react/ui/components/Notification/index.js +2 -1
  554. package/fe/packages/react/ui/components/Overlay/Overlay.js +1 -1
  555. package/fe/packages/react/ui/components/Overlay/index.d.ts +1 -2
  556. package/fe/packages/react/ui/components/Overlay/index.js +2 -1
  557. package/fe/packages/react/ui/components/Pagination/index.d.ts +1 -1
  558. package/fe/packages/react/ui/components/Pagination/index.js +2 -1
  559. package/fe/packages/react/ui/components/Popup/index.d.ts +1 -1
  560. package/fe/packages/react/ui/components/Popup/index.js +2 -1
  561. package/fe/packages/react/ui/components/Radio/index.d.ts +1 -2
  562. package/fe/packages/react/ui/components/Radio/index.js +3 -2
  563. package/fe/packages/react/ui/components/Search/index.d.ts +1 -1
  564. package/fe/packages/react/ui/components/Search/index.js +2 -1
  565. package/fe/packages/react/ui/components/Select/index.d.ts +1 -1
  566. package/fe/packages/react/ui/components/Select/index.js +2 -1
  567. package/fe/packages/react/ui/components/Skeleton/index.d.ts +1 -2
  568. package/fe/packages/react/ui/components/Skeleton/index.js +2 -1
  569. package/fe/packages/react/ui/components/Switch/index.d.ts +1 -1
  570. package/fe/packages/react/ui/components/Switch/index.js +2 -1
  571. package/fe/packages/react/ui/components/TableSearch/index.d.ts +1 -2
  572. package/fe/packages/react/ui/components/TableSearch/index.js +2 -1
  573. package/fe/packages/react/ui/components/Tabs/Tabs.js +1 -1
  574. package/fe/packages/react/ui/components/Textarea/index.d.ts +1 -1
  575. package/fe/packages/react/ui/components/Textarea/index.js +2 -1
  576. package/fe/packages/react/ui/components/Tooltip/index.d.ts +1 -1
  577. package/fe/packages/react/ui/components/Tooltip/index.js +2 -1
  578. package/fe/packages/react/ui/components/TreeSelect/index.d.ts +1 -1
  579. package/fe/packages/react/ui/components/TreeSelect/index.js +2 -1
  580. package/fe/packages/react/ui/components/Upload/index.d.ts +1 -2
  581. package/fe/packages/react/ui/components/Upload/index.js +3 -2
  582. package/fe/packages/react/ui/components/breadcrumb/index.d.ts +1 -1
  583. package/fe/packages/react/ui/components/breadcrumb/index.js +2 -1
  584. package/fe/packages/react/ui/components/index.d.ts +3 -33
  585. package/fe/packages/react/ui/components/index.js +69 -77
  586. package/fe/packages/react/ui/components/table/index.d.ts +1 -1
  587. package/fe/packages/react/ui/components/table/index.js +2 -1
  588. package/fe/packages/react/ui/i18n/I18nProvider.d.ts +1 -1
  589. package/fe/packages/react/ui/i18n/I18nProvider.js +2 -1
  590. package/fe/packages/react/ui/i18n/index.d.ts +1 -3
  591. package/fe/packages/react/ui/i18n/index.js +8 -7
  592. package/fe/packages/react/ui/i18n/useI18n.d.ts +6 -6
  593. package/fe/packages/react/ui/i18n/useI18n.js +2 -2
  594. package/fe/packages/react/ui/index.css +2 -299
  595. package/fe/packages/react/ui/index.d.ts +0 -2
  596. package/fe/packages/react/ui/index.js +72 -55
  597. package/fe/ssr/apps/dash/dash.entry.js +7 -3
  598. package/fe/ssr/apps/ui-components/ui-components.entry.js +3 -2
  599. package/fe/ssr/components/StreamingRender/StreamingCache.js +6 -0
  600. package/fe/ssr/components/StreamingRender/StreamingRender.d.ts +1 -1
  601. package/fe/ssr/components/StreamingRender/StreamingRender.js +31 -25
  602. package/fe/ssr/components/StreamingRender/StreamingScript.d.ts +2 -0
  603. package/fe/ssr/components/StreamingRender/StreamingScript.js +48 -4
  604. package/fe/ssr/types.d.ts +1 -13
  605. package/models/frontend/src/common/language.d.ts +1 -1
  606. package/models/frontend/src/common/request.d.ts +2 -0
  607. package/models/frontend/src/components/AsyncSelect/AsyncSelect.d.ts +2 -2
  608. package/models/frontend/src/hooks/useText.d.ts +1 -1
  609. package/models/frontend/src/language/resources.d.ts +1 -1
  610. package/models/frontend/src/stores/apiFreezer.d.ts +1 -1
  611. package/models/frontend/src/stores/schemaStore.d.ts +2 -2
  612. package/models/frontend/src/typing/scalability.d.ts +2 -2
  613. package/models/models/types/data/button.d.ts +1 -1
  614. package/models/models/types/data/component.d.ts +1 -1
  615. package/models/models/types/data/schema.d.ts +1 -1
  616. package/models/models/types/data/search.d.ts +1 -1
  617. package/models/packages/common/ssr/hydration.d.ts +2 -0
  618. package/models/packages/react/core/Button/SubmitButton.d.ts +8 -0
  619. package/models/packages/react/core/Button/index.d.ts +3 -0
  620. package/models/packages/react/core/Card/index.d.ts +1 -0
  621. package/models/packages/react/core/Checkbox/index.d.ts +1 -0
  622. package/models/packages/react/core/Label/index.d.ts +2 -0
  623. package/models/packages/react/core/Layout/index.d.ts +1 -0
  624. package/models/packages/react/core/Loading/index.d.ts +1 -0
  625. package/models/packages/react/core/Skeleton/index.d.ts +2 -0
  626. package/models/packages/react/core/breadcrumb/index.d.ts +1 -0
  627. package/models/packages/react/core/hooks/index.d.ts +12 -0
  628. package/models/packages/react/core/hooks/useBreadcrumb.d.ts +9 -0
  629. package/models/packages/react/core/hooks/useHydrationData.d.ts +2 -0
  630. package/models/packages/react/core/hooks/useInit.d.ts +2 -0
  631. package/models/packages/react/core/hooks/useLanguage.d.ts +1 -0
  632. package/models/packages/react/core/hooks/usePagination.d.ts +15 -0
  633. package/models/packages/react/core/hooks/useRefState.d.ts +9 -0
  634. package/models/packages/react/core/hooks/useSSR.d.ts +6 -0
  635. package/models/packages/react/core/hooks/useTableState.d.ts +22 -0
  636. package/models/packages/react/core/hooks/useWatch.d.ts +14 -0
  637. package/models/packages/react/core/index.d.ts +12 -0
  638. package/models/packages/react/core/internal/hydration.d.ts +12 -0
  639. package/models/packages/react/core/internal/i18n/default.d.ts +86 -0
  640. package/models/packages/react/core/internal/i18n/en-US.d.ts +86 -0
  641. package/models/packages/react/core/internal/i18n/index.d.ts +18 -0
  642. package/models/packages/react/core/internal/i18n/locales.d.ts +7 -0
  643. package/models/packages/react/core/internal/i18n/types.d.ts +47 -0
  644. package/models/packages/react/core/internal/raf-timeout.d.ts +2 -0
  645. package/models/packages/react/core/internal/react19-compat.d.ts +15 -0
  646. package/models/packages/react/core/lib/export.d.ts +21 -0
  647. package/models/packages/react/core/lib/index.d.ts +4 -0
  648. package/models/packages/react/core/lib/utils.d.ts +10 -0
  649. package/models/packages/react/core/stores/breadcrumb.d.ts +14 -0
  650. package/models/packages/react/core/stores/index.d.ts +2 -0
  651. package/models/packages/react/core/stores/language.d.ts +3 -0
  652. package/models/packages/react/core/types/baseType.d.ts +21 -0
  653. package/models/packages/react/forms/DataTable/ActionBtn.d.ts +7 -0
  654. package/models/packages/react/forms/DataTable/index.d.ts +32 -0
  655. package/models/packages/react/forms/Date/dropdownPositioning.d.ts +2 -0
  656. package/models/packages/react/forms/Date/index.d.ts +5 -0
  657. package/models/packages/react/forms/Date/locales.d.ts +30 -0
  658. package/models/packages/react/forms/Form/FormItem.d.ts +19 -0
  659. package/models/packages/react/forms/Form/SchemaForm/data.d.ts +40 -0
  660. package/models/packages/react/forms/Form/SchemaForm/index.d.ts +60 -0
  661. package/models/packages/react/forms/Form/index.d.ts +5 -0
  662. package/models/packages/react/forms/Input/index.d.ts +1 -0
  663. package/models/packages/react/forms/InputNumber/InputNumber.d.ts +25 -0
  664. package/models/packages/react/forms/InputNumber/index.d.ts +1 -0
  665. package/models/packages/react/forms/Pagination/index.d.ts +1 -0
  666. package/models/packages/react/forms/Radio/index.d.ts +2 -0
  667. package/models/packages/react/forms/Search/Search.d.ts +13 -0
  668. package/models/packages/react/forms/Search/index.d.ts +1 -0
  669. package/models/packages/react/forms/Select/dropdownPositioning.d.ts +2 -0
  670. package/models/packages/react/forms/Select/index.d.ts +1 -0
  671. package/models/packages/react/forms/Switch/index.d.ts +1 -0
  672. package/models/packages/react/forms/TableSearch/TableSearch.d.ts +30 -0
  673. package/models/packages/react/forms/TableSearch/index.d.ts +2 -0
  674. package/models/packages/react/forms/TableSearch/lang.d.ts +16 -0
  675. package/models/packages/react/forms/Textarea/index.d.ts +1 -0
  676. package/models/packages/react/forms/TreeSelect/index.d.ts +1 -0
  677. package/models/packages/react/forms/Upload/index.d.ts +2 -0
  678. package/models/packages/react/forms/index.d.ts +15 -0
  679. package/models/packages/react/forms/table/index.d.ts +1 -0
  680. package/models/packages/react/i18n/I18nContext.d.ts +6 -0
  681. package/models/packages/react/i18n/I18nProvider.d.ts +6 -0
  682. package/models/packages/react/i18n/getUiReactLocale.d.ts +176 -0
  683. package/models/packages/react/i18n/index.d.ts +5 -0
  684. package/models/packages/react/i18n/legacy.d.ts +9 -0
  685. package/models/packages/react/i18n/locales/en-US.d.ts +1 -0
  686. package/models/packages/react/i18n/locales/zh-CN.d.ts +1 -0
  687. package/models/packages/react/i18n/useI18n.d.ts +2 -0
  688. package/models/packages/react/i18n/useI18nState.d.ts +3 -0
  689. package/models/packages/react/index.d.ts +6 -0
  690. package/models/packages/react/overlays/Dialog/index.d.ts +1 -0
  691. package/models/packages/react/overlays/Drawer/index.d.ts +2 -0
  692. package/models/packages/react/overlays/Dropdown/Dropdown.d.ts +24 -0
  693. package/models/packages/react/overlays/Dropdown/index.d.ts +1 -0
  694. package/models/packages/react/overlays/DropdownMenu/index.d.ts +8 -0
  695. package/models/packages/react/overlays/Message/index.d.ts +2 -0
  696. package/models/packages/react/overlays/Modal/ModalManager.d.ts +46 -0
  697. package/models/packages/react/overlays/Modal/index.d.ts +3 -0
  698. package/models/packages/react/overlays/Overlay/Overlay.d.ts +19 -0
  699. package/models/packages/react/overlays/Overlay/index.d.ts +2 -0
  700. package/models/packages/react/overlays/Popover/index.d.ts +1 -0
  701. package/models/packages/react/overlays/Popup/Popup.d.ts +25 -0
  702. package/models/packages/react/overlays/Popup/index.d.ts +1 -0
  703. package/models/packages/react/overlays/Tooltip/index.d.ts +1 -0
  704. package/models/packages/react/overlays/index.d.ts +10 -0
  705. package/models/packages/react/ui/components/ImagePreview/PreviewImage.d.ts +1 -1
  706. package/models/packages/react/ui/components/index.d.ts +3 -33
  707. package/models/packages/react/ui/i18n/useI18n.d.ts +6 -6
  708. package/package.json +104 -22
  709. package/ssr/STREAMING_BOOTSTRAP.md +360 -0
  710. package/types/app/ai/agent/agent-run.dto.d.ts +7 -0
  711. package/types/app/ai/agent/agent-scanner.service.d.ts +16 -0
  712. package/types/app/ai/agent/agent.interface.d.ts +13 -0
  713. package/types/app/ai/agent/agent.module.d.ts +2 -0
  714. package/types/app/ai/ai-config.module.d.ts +4 -0
  715. package/types/app/ai/ai-config.service.d.ts +10 -0
  716. package/types/app/ai/ai.controller.d.ts +3 -0
  717. package/types/app/ai/ai.module.d.ts +4 -0
  718. package/types/app/ai/contracts/index.d.ts +129 -0
  719. package/types/app/ai/declaration-paths.d.ts +3 -0
  720. package/types/app/ai/eval/assertions.d.ts +26 -0
  721. package/types/app/ai/guardrail/guardrail.interface.d.ts +10 -0
  722. package/types/app/ai/guardrail/guardrail.module.d.ts +2 -0
  723. package/types/app/ai/guardrail/guardrail.service.d.ts +11 -0
  724. package/types/app/ai/guardrail/internal/load-guardrail-config.d.ts +4 -0
  725. package/types/app/ai/mcp/internal/load-mcp-config.d.ts +7 -0
  726. package/types/app/ai/mcp/mcp-registry.service.d.ts +11 -0
  727. package/types/app/ai/mcp/mcp.client.d.ts +41 -0
  728. package/types/app/ai/mcp/mcp.loader.d.ts +26 -0
  729. package/types/app/ai/mcp/mcp.module.d.ts +14 -0
  730. package/types/app/ai/mcp/mcp.types.d.ts +51 -0
  731. package/types/app/ai/memory/checkpoint.service.d.ts +15 -0
  732. package/types/app/ai/memory/internal/load-memory-config.d.ts +9 -0
  733. package/types/app/ai/memory/memory.module.d.ts +2 -0
  734. package/types/app/ai/memory/thread.service.d.ts +34 -0
  735. package/types/app/ai/rag/chunker.d.ts +14 -0
  736. package/types/app/ai/rag/internal/load-embedding-config.d.ts +11 -0
  737. package/types/app/ai/rag/internal/load-rag-config.d.ts +16 -0
  738. package/types/app/ai/rag/rag.interface.d.ts +57 -0
  739. package/types/app/ai/rag/rag.module.d.ts +2 -0
  740. package/types/app/ai/rag/retriever.service.d.ts +18 -0
  741. package/types/app/ai/retention/conversation-retention.service.d.ts +20 -0
  742. package/types/app/ai/retention/retention-policy.d.ts +5 -0
  743. package/types/app/ai/runtime/ai-runtime-startup.validator.d.ts +11 -0
  744. package/types/app/ai/runtime/internal/agent-run-context.d.ts +12 -0
  745. package/types/app/ai/runtime/internal/compact-tool-result.d.ts +21 -0
  746. package/types/app/ai/runtime/internal/context-compaction.service.d.ts +33 -0
  747. package/types/app/ai/runtime/internal/load-llm-config.d.ts +26 -0
  748. package/types/app/ai/runtime/internal/load-runtime-config.d.ts +13 -0
  749. package/types/app/ai/runtime/internal/request-budget.d.ts +44 -0
  750. package/types/app/ai/runtime/internal/run-event-queue.d.ts +11 -0
  751. package/types/app/ai/runtime/langchain/langchain-planner.service.d.ts +49 -0
  752. package/types/app/ai/runtime/langchain/skill-tool.adapter.d.ts +9 -0
  753. package/types/app/ai/runtime/langgraph/agent.graph.d.ts +130 -0
  754. package/types/app/ai/runtime/langgraph/agent.state.d.ts +43 -0
  755. package/types/app/ai/runtime/langgraph/langgraph-orchestrator.service.d.ts +87 -0
  756. package/types/app/ai/runtime/runtime.module.d.ts +7 -0
  757. package/types/app/ai/runtime/thread-execution-coordinator.d.ts +21 -0
  758. package/types/app/ai/skill/skill-scanner.service.d.ts +17 -0
  759. package/types/app/ai/skill/skill.interface.d.ts +9 -0
  760. package/types/app/ai/skill/skill.module.d.ts +2 -0
  761. package/types/app/ai/store/internal/archive-id.d.ts +1 -0
  762. package/types/app/ai/store/internal/load-store-config.d.ts +22 -0
  763. package/types/app/ai/store/internal/load-thread-state-store.d.ts +4 -0
  764. package/types/app/ai/store/reference/file-memory.store.d.ts +33 -0
  765. package/types/app/ai/store/reference/file-trace.store.d.ts +14 -0
  766. package/types/app/ai/store/reference/file-vector.store.d.ts +12 -0
  767. package/types/app/ai/store/reference/qdrant-vector.store.d.ts +9 -0
  768. package/types/app/ai/store/store.interface.d.ts +141 -0
  769. package/types/app/ai/store/store.module.d.ts +2 -0
  770. package/types/app/ai/tool/builtin/index.d.ts +6 -0
  771. package/types/app/ai/tool/builtin/invoke-agent.tool.d.ts +4 -0
  772. package/types/app/ai/tool/builtin/retrieve.tool.d.ts +7 -0
  773. package/types/app/ai/tool/executor.service.d.ts +14 -0
  774. package/types/app/ai/tool/tool-registry.service.d.ts +18 -0
  775. package/types/app/ai/tool/tool.interface.d.ts +33 -0
  776. package/types/app/ai/tool/tool.module.d.ts +2 -0
  777. package/types/app/ai/trace/trace.service.d.ts +33 -0
  778. package/types/app/csr/controller.d.ts +3 -0
  779. package/types/app/extends/$fetch.d.ts +1 -3
  780. package/types/app/extends/crypto.d.ts +3 -5
  781. package/types/app/extends/db.d.ts +5 -3
  782. package/types/app/extends/logger.d.ts +16 -10
  783. package/types/app/frontend-development.d.ts +14 -0
  784. package/types/app/html/browser-options.d.ts +3 -0
  785. package/types/app/http/body-parser.middleware.d.ts +9 -0
  786. package/types/app/http/compression.middleware.d.ts +7 -0
  787. package/types/app/http/context.d.ts +11 -0
  788. package/types/app/http/controller.d.ts +7 -0
  789. package/types/app/http/error-response.d.ts +3 -0
  790. package/types/app/http/errors.d.ts +25 -0
  791. package/types/app/http/exception-filter.d.ts +11 -0
  792. package/types/app/http/request-data.d.ts +9 -0
  793. package/types/app/http/request-schema.pipe.d.ts +18 -0
  794. package/types/app/http/response.d.ts +10 -0
  795. package/types/app/http/response.interceptor.d.ts +5 -0
  796. package/types/app/http/security.guard.d.ts +13 -0
  797. package/types/app/project/controller.d.ts +3 -0
  798. package/types/app/project/service.d.ts +19 -0
  799. package/types/app/providers/csr.d.ts +21 -0
  800. package/types/app/providers/foundation.d.ts +8 -0
  801. package/types/app/ssr/artifacts.d.ts +25 -0
  802. package/types/app/ssr/controller.d.ts +3 -0
  803. package/types/app/ssr/html.d.ts +30 -10
  804. package/types/app/ssr/session.d.ts +44 -0
  805. package/types/app/ssr/stream.d.ts +5 -0
  806. package/types/app/ssr/streaming-request-cache.d.ts +10 -0
  807. package/types/app/ssr/types.d.ts +14 -0
  808. package/types/app/static-assets.middleware.d.ts +10 -0
  809. package/types/app/template-core.module.d.ts +12 -0
  810. package/types/app/utils/i18n.d.ts +7 -4
  811. package/types/bundler/buildFE.d.ts +4 -1
  812. package/types/bundler/buildSSR.d.ts +1 -1
  813. package/types/bundler/dev-session.d.ts +23 -0
  814. package/types/bundler/dev.d.ts +4 -1
  815. package/types/bundler/feSharedConfig.d.ts +3 -1
  816. package/types/bundler/index.d.ts +4 -0
  817. package/types/bundler/prod.d.ts +2 -1
  818. package/types/bundler/state.d.ts +3 -5
  819. package/types/bundler/utils.d.ts +16 -5
  820. package/types/config/config.default.d.ts +10 -0
  821. package/types/index.d.ts +45 -29
  822. package/types/packages/common/ssr/hydration.d.ts +2 -0
  823. package/types/packages/core/bootstrap.d.ts +5 -0
  824. package/types/packages/core/config-service.d.ts +13 -0
  825. package/types/packages/core/duplicate-route-checking-adapter.d.ts +23 -0
  826. package/types/packages/core/index.d.ts +8 -6
  827. package/types/packages/core/legacy-factory-diagnostics.d.ts +2 -0
  828. package/types/packages/core/loader/model.d.ts +14 -10
  829. package/types/packages/core/paths.d.ts +0 -14
  830. package/types/packages/core/resource-lifecycle.d.ts +7 -0
  831. package/types/packages/core/startup.d.ts +70 -0
  832. package/types/packages/core/tokens.d.ts +8 -0
  833. package/types/scripts/vite-build/types.d.ts +3 -0
  834. package/types/ssrSharedData/outputPaths.d.ts +2 -2
  835. package/.skills/tc-generator/reference/project-template/app/controller/product.js +0 -73
  836. package/.skills/tc-generator/reference/project-template/app/router/product.js +0 -9
  837. package/cjs/app/controller/base.js +0 -1
  838. package/cjs/app/controller/project.js +0 -1
  839. package/cjs/app/controller/ssr.js +0 -1
  840. package/cjs/app/controller/view.js +0 -1
  841. package/cjs/app/extends/generateErrorMessage.js +0 -1
  842. package/cjs/app/extends/localCacheHtmlEtag.js +0 -1
  843. package/cjs/app/extends/parsingParamsOnUrl.js +0 -1
  844. package/cjs/app/extends/render-view.js +0 -1
  845. package/cjs/app/middleware.js +0 -1
  846. package/cjs/app/middlewares/api-params-verify.js +0 -1
  847. package/cjs/app/middlewares/api-sign-verify.js +0 -1
  848. package/cjs/app/middlewares/error-handle.js +0 -1
  849. package/cjs/app/middlewares/project-handler.js +0 -1
  850. package/cjs/app/middlewares/request-parameter-parsing.js +0 -1
  851. package/cjs/app/router/project.js +0 -1
  852. package/cjs/app/router/ssr.js +0 -1
  853. package/cjs/app/router/view.js +0 -1
  854. package/cjs/app/router-schema/project.js +0 -1
  855. package/cjs/app/service/base.js +0 -1
  856. package/cjs/app/service/project.js +0 -1
  857. package/cjs/packages/core/env.js +0 -1
  858. package/cjs/packages/core/loader/config.js +0 -1
  859. package/cjs/packages/core/loader/controller.js +0 -1
  860. package/cjs/packages/core/loader/extend.js +0 -1
  861. package/cjs/packages/core/loader/merge.js +0 -1
  862. package/cjs/packages/core/loader/middleware.js +0 -1
  863. package/cjs/packages/core/loader/router-schema.js +0 -1
  864. package/cjs/packages/core/loader/router.js +0 -1
  865. package/cjs/packages/core/loader/service.js +0 -1
  866. package/esm/_virtual/_rolldown/runtime.js +0 -7
  867. package/esm/app/controller/base.js +0 -26
  868. package/esm/app/controller/project.js +0 -58
  869. package/esm/app/controller/ssr.js +0 -215
  870. package/esm/app/controller/view.js +0 -43
  871. package/esm/app/extends/generateErrorMessage.js +0 -7
  872. package/esm/app/extends/localCacheHtmlEtag.js +0 -41
  873. package/esm/app/extends/parsingParamsOnUrl.js +0 -14
  874. package/esm/app/extends/render-view.js +0 -18
  875. package/esm/app/middleware.js +0 -31
  876. package/esm/app/middlewares/api-params-verify.js +0 -56
  877. package/esm/app/middlewares/api-sign-verify.js +0 -16
  878. package/esm/app/middlewares/error-handle.js +0 -25
  879. package/esm/app/middlewares/project-handler.js +0 -16
  880. package/esm/app/middlewares/request-parameter-parsing.js +0 -18
  881. package/esm/app/router/project.js +0 -7
  882. package/esm/app/router/ssr.js +0 -8
  883. package/esm/app/router/view.js +0 -8
  884. package/esm/app/router-schema/project.js +0 -15
  885. package/esm/app/service/base.js +0 -14
  886. package/esm/app/service/project.js +0 -23
  887. package/esm/packages/core/env.js +0 -24
  888. package/esm/packages/core/loader/config.js +0 -29
  889. package/esm/packages/core/loader/controller.js +0 -15
  890. package/esm/packages/core/loader/extend.js +0 -32
  891. package/esm/packages/core/loader/merge.js +0 -7
  892. package/esm/packages/core/loader/middleware.js +0 -15
  893. package/esm/packages/core/loader/router-schema.js +0 -26
  894. package/esm/packages/core/loader/router.js +0 -45
  895. package/esm/packages/core/loader/service.js +0 -15
  896. package/fe/_virtual/_rolldown/runtime.js +0 -13
  897. package/fe/packages/react/hooks/index.d.ts +0 -11
  898. package/fe/packages/react/hooks/index.js +0 -10
  899. package/fe/packages/react/hooks/useBreadcrumb.d.ts +0 -9
  900. package/fe/packages/react/hooks/useBreadcrumb.js +0 -5
  901. package/fe/packages/react/hooks/useExecuteOnce.js +0 -47
  902. package/fe/packages/react/hooks/useHydrationData.d.ts +0 -2
  903. package/fe/packages/react/hooks/useHydrationData.js +0 -23
  904. package/fe/packages/react/hooks/useInit.js +0 -11
  905. package/fe/packages/react/hooks/useLanguage.d.ts +0 -1
  906. package/fe/packages/react/hooks/useLanguage.js +0 -8
  907. package/fe/packages/react/hooks/usePagination.js +0 -30
  908. package/fe/packages/react/hooks/useRefState.js +0 -45
  909. package/fe/packages/react/hooks/useSSR.js +0 -46
  910. package/fe/packages/react/hooks/useWatch.js +0 -60
  911. package/fe/packages/react/ui/components/Button/Button.js +0 -88
  912. package/fe/packages/react/ui/components/Button/SubmitButton.d.ts +0 -8
  913. package/fe/packages/react/ui/components/Button/SubmitButton.js +0 -30
  914. package/fe/packages/react/ui/components/Card/Card.js +0 -31
  915. package/fe/packages/react/ui/components/Checkbox/Checkbox.js +0 -52
  916. package/fe/packages/react/ui/components/ConfirmDialog/ConfirmDialog.js +0 -41
  917. package/fe/packages/react/ui/components/DataTable/ActionBtn.d.ts +0 -7
  918. package/fe/packages/react/ui/components/DataTable/ActionBtn.js +0 -116
  919. package/fe/packages/react/ui/components/DataTable/dataTableWidth.js +0 -33
  920. package/fe/packages/react/ui/components/Date/Calendar.js +0 -351
  921. package/fe/packages/react/ui/components/Date/Date.js +0 -210
  922. package/fe/packages/react/ui/components/Date/DateTestPage.d.ts +0 -1
  923. package/fe/packages/react/ui/components/Date/DateTestPage.js +0 -24
  924. package/fe/packages/react/ui/components/Date/LocaleContext.js +0 -36
  925. package/fe/packages/react/ui/components/Date/LocaleProvider.js +0 -22
  926. package/fe/packages/react/ui/components/Date/TimePicker.js +0 -136
  927. package/fe/packages/react/ui/components/Date/data.js +0 -7
  928. package/fe/packages/react/ui/components/Date/dateLocaleStore.js +0 -14
  929. package/fe/packages/react/ui/components/Date/dropdownPositioning.d.ts +0 -2
  930. package/fe/packages/react/ui/components/Date/dropdownPositioning.js +0 -12
  931. package/fe/packages/react/ui/components/Date/locales.d.ts +0 -30
  932. package/fe/packages/react/ui/components/Date/locales.js +0 -56
  933. package/fe/packages/react/ui/components/Drawer/Drawer.js +0 -151
  934. package/fe/packages/react/ui/components/Dropdown/Dropdown.d.ts +0 -24
  935. package/fe/packages/react/ui/components/Dropdown/Dropdown.js +0 -105
  936. package/fe/packages/react/ui/components/Form/Form.js +0 -15
  937. package/fe/packages/react/ui/components/Form/FormItem.d.ts +0 -19
  938. package/fe/packages/react/ui/components/Form/FormItem.js +0 -60
  939. package/fe/packages/react/ui/components/Form/SchemaForm/data.d.ts +0 -40
  940. package/fe/packages/react/ui/components/Form/SchemaForm/data.js +0 -15
  941. package/fe/packages/react/ui/components/Form/SchemaForm/defaultComponentsMap.js +0 -4
  942. package/fe/packages/react/ui/components/Form/SchemaForm/index.d.ts +0 -60
  943. package/fe/packages/react/ui/components/Form/SchemaForm/index.js +0 -119
  944. package/fe/packages/react/ui/components/Input/Input.js +0 -146
  945. package/fe/packages/react/ui/components/InputNumber/InputNumber.d.ts +0 -25
  946. package/fe/packages/react/ui/components/InputNumber/InputNumber.js +0 -207
  947. package/fe/packages/react/ui/components/InputNumber/inputNumberUtils.js +0 -45
  948. package/fe/packages/react/ui/components/Label/Label.js +0 -58
  949. package/fe/packages/react/ui/components/Layout/Layout.js +0 -33
  950. package/fe/packages/react/ui/components/Loading/Loading.js +0 -48
  951. package/fe/packages/react/ui/components/Menu/Menu.js +0 -147
  952. package/fe/packages/react/ui/components/Menu/MenuContext.js +0 -88
  953. package/fe/packages/react/ui/components/Menu/MenuItem.js +0 -78
  954. package/fe/packages/react/ui/components/Menu/SubMenu.js +0 -207
  955. package/fe/packages/react/ui/components/Menu/utils.js +0 -8
  956. package/fe/packages/react/ui/components/Message/Message.js +0 -76
  957. package/fe/packages/react/ui/components/Message/MessageManager.js +0 -104
  958. package/fe/packages/react/ui/components/Message/data.js +0 -4
  959. package/fe/packages/react/ui/components/Modal/Modal.js +0 -59
  960. package/fe/packages/react/ui/components/Modal/ModalManager.d.ts +0 -46
  961. package/fe/packages/react/ui/components/Modal/ModalManager.js +0 -106
  962. package/fe/packages/react/ui/components/Notification/Notification.js +0 -56
  963. package/fe/packages/react/ui/components/Pagination/Pagination.js +0 -115
  964. package/fe/packages/react/ui/components/Popup/Popup.d.ts +0 -25
  965. package/fe/packages/react/ui/components/Popup/Popup.js +0 -91
  966. package/fe/packages/react/ui/components/Radio/Radio.js +0 -36
  967. package/fe/packages/react/ui/components/Radio/RadioGroup.js +0 -33
  968. package/fe/packages/react/ui/components/Search/Search.d.ts +0 -13
  969. package/fe/packages/react/ui/components/Search/Search.js +0 -24
  970. package/fe/packages/react/ui/components/Select/Select.js +0 -282
  971. package/fe/packages/react/ui/components/Select/dropdownPositioning.d.ts +0 -2
  972. package/fe/packages/react/ui/components/Select/dropdownPositioning.js +0 -16
  973. package/fe/packages/react/ui/components/Skeleton/Skeleton.js +0 -101
  974. package/fe/packages/react/ui/components/Switch/Switch.js +0 -28
  975. package/fe/packages/react/ui/components/TableSearch/TableSearch.d.ts +0 -30
  976. package/fe/packages/react/ui/components/TableSearch/TableSearch.js +0 -166
  977. package/fe/packages/react/ui/components/TableSearch/lang.d.ts +0 -16
  978. package/fe/packages/react/ui/components/TableSearch/lang.js +0 -25
  979. package/fe/packages/react/ui/components/TableSearch/tableSearchLocaleStore.js +0 -10
  980. package/fe/packages/react/ui/components/Textarea/Textarea.js +0 -58
  981. package/fe/packages/react/ui/components/Tooltip/Tooltip.js +0 -77
  982. package/fe/packages/react/ui/components/TreeSelect/TreeSelect.js +0 -190
  983. package/fe/packages/react/ui/components/Upload/ImageUpload.js +0 -101
  984. package/fe/packages/react/ui/components/Upload/Upload.js +0 -29
  985. package/fe/packages/react/ui/components/breadcrumb/breadcrumb.js +0 -155
  986. package/fe/packages/react/ui/components/hooks/useDropdownPositioning.js +0 -121
  987. package/fe/packages/react/ui/components/hooks/useInputController.js +0 -39
  988. package/fe/packages/react/ui/components/table/table.js +0 -166
  989. package/fe/packages/react/ui/components/testPage/DemoSection.d.ts +0 -10
  990. package/fe/packages/react/ui/components/testPage/DemoSection.js +0 -73
  991. package/fe/packages/react/ui/components/testPage/MenuTestPage.js +0 -24
  992. package/fe/packages/react/ui/components/testPage/demoRegistry.d.ts +0 -4
  993. package/fe/packages/react/ui/components/testPage/demoRegistry.js +0 -217
  994. package/fe/packages/react/ui/components/testPage/demos/core/BreadcrumbDemo.d.ts +0 -6
  995. package/fe/packages/react/ui/components/testPage/demos/core/BreadcrumbDemo.js +0 -44
  996. package/fe/packages/react/ui/components/testPage/demos/core/BreadcrumbDemo2.js +0 -4
  997. package/fe/packages/react/ui/components/testPage/demos/core/ButtonDemo.d.ts +0 -6
  998. package/fe/packages/react/ui/components/testPage/demos/core/ButtonDemo.js +0 -85
  999. package/fe/packages/react/ui/components/testPage/demos/core/ButtonDemo2.js +0 -4
  1000. package/fe/packages/react/ui/components/testPage/demos/core/CardDemo.d.ts +0 -6
  1001. package/fe/packages/react/ui/components/testPage/demos/core/CardDemo.js +0 -52
  1002. package/fe/packages/react/ui/components/testPage/demos/core/CardDemo2.js +0 -4
  1003. package/fe/packages/react/ui/components/testPage/demos/core/CheckboxDemo.d.ts +0 -6
  1004. package/fe/packages/react/ui/components/testPage/demos/core/CheckboxDemo.js +0 -41
  1005. package/fe/packages/react/ui/components/testPage/demos/core/CheckboxDemo2.js +0 -4
  1006. package/fe/packages/react/ui/components/testPage/demos/core/ConfirmDialogDemo.d.ts +0 -6
  1007. package/fe/packages/react/ui/components/testPage/demos/core/ConfirmDialogDemo.js +0 -35
  1008. package/fe/packages/react/ui/components/testPage/demos/core/ConfirmDialogDemo2.js +0 -4
  1009. package/fe/packages/react/ui/components/testPage/demos/core/DataTableDemo.d.ts +0 -6
  1010. package/fe/packages/react/ui/components/testPage/demos/core/DataTableDemo.js +0 -273
  1011. package/fe/packages/react/ui/components/testPage/demos/core/DataTableDemo2.js +0 -4
  1012. package/fe/packages/react/ui/components/testPage/demos/core/DrawerDemo.d.ts +0 -6
  1013. package/fe/packages/react/ui/components/testPage/demos/core/DrawerDemo.js +0 -105
  1014. package/fe/packages/react/ui/components/testPage/demos/core/DrawerDemo2.js +0 -4
  1015. package/fe/packages/react/ui/components/testPage/demos/core/DropdownDemo.d.ts +0 -6
  1016. package/fe/packages/react/ui/components/testPage/demos/core/DropdownDemo.js +0 -48
  1017. package/fe/packages/react/ui/components/testPage/demos/core/DropdownDemo2.js +0 -4
  1018. package/fe/packages/react/ui/components/testPage/demos/core/FormDemo.d.ts +0 -6
  1019. package/fe/packages/react/ui/components/testPage/demos/core/FormDemo.js +0 -56
  1020. package/fe/packages/react/ui/components/testPage/demos/core/FormDemo2.js +0 -4
  1021. package/fe/packages/react/ui/components/testPage/demos/core/ImageUploadDemo.d.ts +0 -6
  1022. package/fe/packages/react/ui/components/testPage/demos/core/ImageUploadDemo.js +0 -26
  1023. package/fe/packages/react/ui/components/testPage/demos/core/ImageUploadDemo2.js +0 -4
  1024. package/fe/packages/react/ui/components/testPage/demos/core/InputDemo.d.ts +0 -6
  1025. package/fe/packages/react/ui/components/testPage/demos/core/InputDemo.js +0 -55
  1026. package/fe/packages/react/ui/components/testPage/demos/core/InputDemo2.js +0 -4
  1027. package/fe/packages/react/ui/components/testPage/demos/core/InputNumberDemo.d.ts +0 -6
  1028. package/fe/packages/react/ui/components/testPage/demos/core/InputNumberDemo.js +0 -65
  1029. package/fe/packages/react/ui/components/testPage/demos/core/InputNumberDemo2.js +0 -4
  1030. package/fe/packages/react/ui/components/testPage/demos/core/LabelDemo.d.ts +0 -6
  1031. package/fe/packages/react/ui/components/testPage/demos/core/LabelDemo.js +0 -33
  1032. package/fe/packages/react/ui/components/testPage/demos/core/LabelDemo2.js +0 -4
  1033. package/fe/packages/react/ui/components/testPage/demos/core/LayoutDemo.d.ts +0 -6
  1034. package/fe/packages/react/ui/components/testPage/demos/core/LayoutDemo.js +0 -64
  1035. package/fe/packages/react/ui/components/testPage/demos/core/LayoutDemo2.js +0 -4
  1036. package/fe/packages/react/ui/components/testPage/demos/core/LoadingDemo.d.ts +0 -6
  1037. package/fe/packages/react/ui/components/testPage/demos/core/LoadingDemo.js +0 -32
  1038. package/fe/packages/react/ui/components/testPage/demos/core/LoadingDemo2.js +0 -4
  1039. package/fe/packages/react/ui/components/testPage/demos/core/MessageDemo.d.ts +0 -6
  1040. package/fe/packages/react/ui/components/testPage/demos/core/MessageDemo.js +0 -44
  1041. package/fe/packages/react/ui/components/testPage/demos/core/MessageDemo2.js +0 -4
  1042. package/fe/packages/react/ui/components/testPage/demos/core/ModalDemo.d.ts +0 -6
  1043. package/fe/packages/react/ui/components/testPage/demos/core/ModalDemo.js +0 -61
  1044. package/fe/packages/react/ui/components/testPage/demos/core/ModalDemo2.js +0 -4
  1045. package/fe/packages/react/ui/components/testPage/demos/core/NotificationDemo.d.ts +0 -6
  1046. package/fe/packages/react/ui/components/testPage/demos/core/NotificationDemo.js +0 -50
  1047. package/fe/packages/react/ui/components/testPage/demos/core/NotificationDemo2.js +0 -4
  1048. package/fe/packages/react/ui/components/testPage/demos/core/PaginationDemo.d.ts +0 -6
  1049. package/fe/packages/react/ui/components/testPage/demos/core/PaginationDemo.js +0 -39
  1050. package/fe/packages/react/ui/components/testPage/demos/core/PaginationDemo2.js +0 -4
  1051. package/fe/packages/react/ui/components/testPage/demos/core/PreviewImageDemo.d.ts +0 -6
  1052. package/fe/packages/react/ui/components/testPage/demos/core/PreviewImageDemo.js +0 -22
  1053. package/fe/packages/react/ui/components/testPage/demos/core/PreviewImageDemo2.js +0 -4
  1054. package/fe/packages/react/ui/components/testPage/demos/core/RadioDemo.d.ts +0 -6
  1055. package/fe/packages/react/ui/components/testPage/demos/core/RadioDemo.js +0 -129
  1056. package/fe/packages/react/ui/components/testPage/demos/core/RadioDemo2.js +0 -4
  1057. package/fe/packages/react/ui/components/testPage/demos/core/SchemaFormDemo.d.ts +0 -6
  1058. package/fe/packages/react/ui/components/testPage/demos/core/SchemaFormDemo.js +0 -52
  1059. package/fe/packages/react/ui/components/testPage/demos/core/SchemaFormDemo2.js +0 -4
  1060. package/fe/packages/react/ui/components/testPage/demos/core/SearchDemo.d.ts +0 -6
  1061. package/fe/packages/react/ui/components/testPage/demos/core/SearchDemo.js +0 -52
  1062. package/fe/packages/react/ui/components/testPage/demos/core/SearchDemo2.js +0 -4
  1063. package/fe/packages/react/ui/components/testPage/demos/core/SelectDemo.d.ts +0 -6
  1064. package/fe/packages/react/ui/components/testPage/demos/core/SelectDemo.js +0 -73
  1065. package/fe/packages/react/ui/components/testPage/demos/core/SelectDemo2.js +0 -4
  1066. package/fe/packages/react/ui/components/testPage/demos/core/SkeletonDemo.d.ts +0 -6
  1067. package/fe/packages/react/ui/components/testPage/demos/core/SkeletonDemo.js +0 -46
  1068. package/fe/packages/react/ui/components/testPage/demos/core/SkeletonDemo2.js +0 -4
  1069. package/fe/packages/react/ui/components/testPage/demos/core/SwitchDemo.d.ts +0 -6
  1070. package/fe/packages/react/ui/components/testPage/demos/core/SwitchDemo.js +0 -36
  1071. package/fe/packages/react/ui/components/testPage/demos/core/SwitchDemo2.js +0 -4
  1072. package/fe/packages/react/ui/components/testPage/demos/core/TableDemo.d.ts +0 -6
  1073. package/fe/packages/react/ui/components/testPage/demos/core/TableDemo.js +0 -64
  1074. package/fe/packages/react/ui/components/testPage/demos/core/TableDemo2.js +0 -4
  1075. package/fe/packages/react/ui/components/testPage/demos/core/TableSearchDemo.d.ts +0 -6
  1076. package/fe/packages/react/ui/components/testPage/demos/core/TableSearchDemo.js +0 -74
  1077. package/fe/packages/react/ui/components/testPage/demos/core/TableSearchDemo2.js +0 -4
  1078. package/fe/packages/react/ui/components/testPage/demos/core/TabsDemo.d.ts +0 -6
  1079. package/fe/packages/react/ui/components/testPage/demos/core/TabsDemo.js +0 -56
  1080. package/fe/packages/react/ui/components/testPage/demos/core/TabsDemo2.js +0 -4
  1081. package/fe/packages/react/ui/components/testPage/demos/core/TextareaDemo.d.ts +0 -6
  1082. package/fe/packages/react/ui/components/testPage/demos/core/TextareaDemo.js +0 -30
  1083. package/fe/packages/react/ui/components/testPage/demos/core/TextareaDemo2.js +0 -4
  1084. package/fe/packages/react/ui/components/testPage/demos/core/ThemeSwitcher.d.ts +0 -6
  1085. package/fe/packages/react/ui/components/testPage/demos/core/ThemeSwitcher.js +0 -96
  1086. package/fe/packages/react/ui/components/testPage/demos/core/ThemeSwitcher2.js +0 -4
  1087. package/fe/packages/react/ui/components/testPage/demos/core/TooltipDemo.d.ts +0 -6
  1088. package/fe/packages/react/ui/components/testPage/demos/core/TooltipDemo.js +0 -29
  1089. package/fe/packages/react/ui/components/testPage/demos/core/TooltipDemo2.js +0 -4
  1090. package/fe/packages/react/ui/components/testPage/demos/core/TreeSelectDemo.d.ts +0 -6
  1091. package/fe/packages/react/ui/components/testPage/demos/core/TreeSelectDemo.js +0 -66
  1092. package/fe/packages/react/ui/components/testPage/demos/core/TreeSelectDemo2.js +0 -4
  1093. package/fe/packages/react/ui/components/testPage/demos/date/DateBasicDemo.d.ts +0 -6
  1094. package/fe/packages/react/ui/components/testPage/demos/date/DateBasicDemo.js +0 -31
  1095. package/fe/packages/react/ui/components/testPage/demos/date/DateBasicDemo2.js +0 -4
  1096. package/fe/packages/react/ui/components/testPage/demos/date/DateControlledDemo.d.ts +0 -6
  1097. package/fe/packages/react/ui/components/testPage/demos/date/DateControlledDemo.js +0 -67
  1098. package/fe/packages/react/ui/components/testPage/demos/date/DateControlledDemo2.js +0 -4
  1099. package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDateDemo.d.ts +0 -6
  1100. package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDateDemo.js +0 -36
  1101. package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDateDemo2.js +0 -4
  1102. package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDemo.d.ts +0 -6
  1103. package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDemo.js +0 -35
  1104. package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDemo2.js +0 -4
  1105. package/fe/packages/react/ui/components/testPage/demos/date/DateFormatDemo.d.ts +0 -6
  1106. package/fe/packages/react/ui/components/testPage/demos/date/DateFormatDemo.js +0 -35
  1107. package/fe/packages/react/ui/components/testPage/demos/date/DateFormatDemo2.js +0 -4
  1108. package/fe/packages/react/ui/components/testPage/demos/date/DateRangeDemo.d.ts +0 -6
  1109. package/fe/packages/react/ui/components/testPage/demos/date/DateRangeDemo.js +0 -76
  1110. package/fe/packages/react/ui/components/testPage/demos/date/DateRangeDemo2.js +0 -4
  1111. package/fe/packages/react/ui/components/testPage/demos/date/DateTimeDemo.d.ts +0 -7
  1112. package/fe/packages/react/ui/components/testPage/demos/date/DateTimeDemo.js +0 -60
  1113. package/fe/packages/react/ui/components/testPage/demos/date/DateTimeDemo2.js +0 -4
  1114. package/fe/packages/react/ui/components/testPage/demos/menu/MenuAccordionDemo.d.ts +0 -7
  1115. package/fe/packages/react/ui/components/testPage/demos/menu/MenuAccordionDemo.js +0 -78
  1116. package/fe/packages/react/ui/components/testPage/demos/menu/MenuAccordionDemo2.js +0 -4
  1117. package/fe/packages/react/ui/components/testPage/demos/menu/MenuClickTriggerDemo.d.ts +0 -7
  1118. package/fe/packages/react/ui/components/testPage/demos/menu/MenuClickTriggerDemo.js +0 -79
  1119. package/fe/packages/react/ui/components/testPage/demos/menu/MenuClickTriggerDemo2.js +0 -4
  1120. package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedDemo.d.ts +0 -7
  1121. package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedDemo.js +0 -82
  1122. package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedDemo2.js +0 -4
  1123. package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedNoIconDemo.d.ts +0 -7
  1124. package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedNoIconDemo.js +0 -44
  1125. package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedNoIconDemo2.js +0 -4
  1126. package/fe/packages/react/ui/components/testPage/demos/menu/MenuJsxDemo.d.ts +0 -7
  1127. package/fe/packages/react/ui/components/testPage/demos/menu/MenuJsxDemo.js +0 -64
  1128. package/fe/packages/react/ui/components/testPage/demos/menu/MenuJsxDemo2.js +0 -4
  1129. package/fe/packages/react/ui/components/testPage/demos/menu/MenuLeftMultipleDemo.d.ts +0 -7
  1130. package/fe/packages/react/ui/components/testPage/demos/menu/MenuLeftMultipleDemo.js +0 -81
  1131. package/fe/packages/react/ui/components/testPage/demos/menu/MenuLeftMultipleDemo2.js +0 -4
  1132. package/fe/packages/react/ui/components/testPage/demos/menu/MenuPopupDemo.d.ts +0 -7
  1133. package/fe/packages/react/ui/components/testPage/demos/menu/MenuPopupDemo.js +0 -56
  1134. package/fe/packages/react/ui/components/testPage/demos/menu/MenuPopupDemo2.js +0 -4
  1135. package/fe/packages/react/ui/components/testPage/demos/menu/MenuStateDemo.d.ts +0 -7
  1136. package/fe/packages/react/ui/components/testPage/demos/menu/MenuStateDemo.js +0 -67
  1137. package/fe/packages/react/ui/components/testPage/demos/menu/MenuStateDemo2.js +0 -4
  1138. package/fe/packages/react/ui/components/testPage/demos/menu/MenuTopDemo.d.ts +0 -7
  1139. package/fe/packages/react/ui/components/testPage/demos/menu/MenuTopDemo.js +0 -55
  1140. package/fe/packages/react/ui/components/testPage/demos/menu/MenuTopDemo2.js +0 -4
  1141. package/fe/packages/react/ui/components/testPage/index.d.ts +0 -2
  1142. package/fe/packages/react/ui/components/testPage/index.js +0 -45
  1143. package/fe/packages/react/ui/components/testPage/types.d.ts +0 -17
  1144. package/fe/packages/react/ui/lib/createStoreHook.js +0 -9
  1145. package/fe/packages/react/ui/lib/export.d.ts +0 -21
  1146. package/fe/packages/react/ui/lib/export.js +0 -112
  1147. package/fe/packages/react/ui/lib/utils.d.ts +0 -9
  1148. package/fe/packages/react/ui/lib/utils.js +0 -64
  1149. package/fe/packages/react/ui/stores/breadcrumb.d.ts +0 -14
  1150. package/fe/packages/react/ui/stores/breadcrumb.js +0 -52
  1151. package/fe/packages/react/ui/stores/language.d.ts +0 -3
  1152. package/fe/packages/react/ui/stores/language.js +0 -4
  1153. package/models/packages/react/hooks/useBreadcrumb.d.ts +0 -9
  1154. package/models/packages/react/hooks/useLanguage.d.ts +0 -1
  1155. package/models/packages/react/ui/components/Button/SubmitButton.d.ts +0 -8
  1156. package/models/packages/react/ui/components/DataTable/ActionBtn.d.ts +0 -7
  1157. package/models/packages/react/ui/components/DataTable/index.d.ts +0 -32
  1158. package/models/packages/react/ui/components/Date/dropdownPositioning.d.ts +0 -2
  1159. package/models/packages/react/ui/components/Date/locales.d.ts +0 -30
  1160. package/models/packages/react/ui/components/Dropdown/Dropdown.d.ts +0 -24
  1161. package/models/packages/react/ui/components/Form/FormItem.d.ts +0 -19
  1162. package/models/packages/react/ui/components/Form/SchemaForm/data.d.ts +0 -40
  1163. package/models/packages/react/ui/components/Form/SchemaForm/index.d.ts +0 -60
  1164. package/models/packages/react/ui/components/Form/index.d.ts +0 -4
  1165. package/models/packages/react/ui/components/InputNumber/InputNumber.d.ts +0 -25
  1166. package/models/packages/react/ui/components/Modal/ModalManager.d.ts +0 -46
  1167. package/models/packages/react/ui/components/Popup/Popup.d.ts +0 -25
  1168. package/models/packages/react/ui/components/Search/Search.d.ts +0 -13
  1169. package/models/packages/react/ui/components/Select/dropdownPositioning.d.ts +0 -2
  1170. package/models/packages/react/ui/components/TableSearch/TableSearch.d.ts +0 -30
  1171. package/models/packages/react/ui/components/TableSearch/lang.d.ts +0 -16
  1172. package/models/packages/react/ui/i18n/I18nProvider.d.ts +0 -12
  1173. package/models/packages/react/ui/i18n/index.d.ts +0 -3
  1174. package/models/packages/react/ui/index.d.ts +0 -4
  1175. package/models/packages/react/ui/lib/export.d.ts +0 -21
  1176. package/models/packages/react/ui/lib/utils.d.ts +0 -9
  1177. package/models/packages/react/ui/stores/breadcrumb.d.ts +0 -14
  1178. package/models/packages/react/ui/stores/language.d.ts +0 -3
  1179. package/types/app/controller/base.d.ts +0 -12
  1180. package/types/app/controller/project.d.ts +0 -22
  1181. package/types/app/controller/ssr.d.ts +0 -14
  1182. package/types/app/controller/view.d.ts +0 -8
  1183. package/types/app/extends/generateErrorMessage.d.ts +0 -7
  1184. package/types/app/extends/localCacheHtmlEtag.d.ts +0 -10
  1185. package/types/app/extends/parsingParamsOnUrl.d.ts +0 -2
  1186. package/types/app/extends/render-view.d.ts +0 -7
  1187. package/types/app/middleware.d.ts +0 -3
  1188. package/types/app/middlewares/api-params-verify.d.ts +0 -4
  1189. package/types/app/middlewares/api-sign-verify.d.ts +0 -4
  1190. package/types/app/middlewares/error-handle.d.ts +0 -4
  1191. package/types/app/middlewares/project-handler.d.ts +0 -4
  1192. package/types/app/middlewares/request-parameter-parsing.d.ts +0 -7
  1193. package/types/app/router/project.d.ts +0 -4
  1194. package/types/app/router/ssr.d.ts +0 -6
  1195. package/types/app/router/view.d.ts +0 -3
  1196. package/types/app/router-schema/project.d.ts +0 -3
  1197. package/types/app/service/base.d.ts +0 -9
  1198. package/types/app/service/project.d.ts +0 -57
  1199. package/types/app/type.d.ts +0 -35
  1200. package/types/app/typings.d.ts +0 -50
  1201. package/types/packages/core/env.d.ts +0 -15
  1202. package/types/packages/core/loader/config.d.ts +0 -9
  1203. package/types/packages/core/loader/controller.d.ts +0 -17
  1204. package/types/packages/core/loader/extend.d.ts +0 -8
  1205. package/types/packages/core/loader/merge.d.ts +0 -3
  1206. package/types/packages/core/loader/middleware.d.ts +0 -11
  1207. package/types/packages/core/loader/router-schema.d.ts +0 -18
  1208. package/types/packages/core/loader/router.d.ts +0 -8
  1209. package/types/packages/core/loader/service.d.ts +0 -17
  1210. package/types/packages/core/types.d.ts +0 -158
  1211. /package/cjs/app/{type.js → ai/agent/agent-run.dto.js} +0 -0
  1212. /package/cjs/app/{typings.js → ai/agent/agent.interface.js} +0 -0
  1213. /package/{fe/packages/react/ui/types → cjs/app/ai/contracts}/index.js +0 -0
  1214. /package/cjs/{packages/core/types.js → app/ai/guardrail/guardrail.interface.js} +0 -0
  1215. /package/{esm/app/type.js → cjs/app/ai/skill/skill.interface.js} +0 -0
  1216. /package/{esm/app/typings.js → cjs/app/ai/tool/tool.interface.js} +0 -0
  1217. /package/{esm/packages/core → cjs/app/ssr}/types.js +0 -0
  1218. /package/{fe/packages/react/ui/components/Menu/menuTypes.js → esm/app/ai/agent/agent-run.dto.js} +0 -0
  1219. /package/{fe/packages/react/ui/components/testPage/types.js → esm/app/ai/agent/agent.interface.js} +0 -0
  1220. /package/fe/packages/react/{ui/assets → assets}/table/no-result.svg +0 -0
  1221. /package/fe/packages/react/{ui/components → core}/Button/Button.d.ts +0 -0
  1222. /package/{models/packages/react/ui/components → fe/packages/react/core}/Button/index.d.ts +0 -0
  1223. /package/fe/packages/react/{ui/components → core}/Card/Card.d.ts +0 -0
  1224. /package/{models/packages/react/ui/components → fe/packages/react/core}/Card/index.d.ts +0 -0
  1225. /package/fe/packages/react/{ui/components → core}/Checkbox/Checkbox.d.ts +0 -0
  1226. /package/{models/packages/react/ui/components → fe/packages/react/core}/Checkbox/index.d.ts +0 -0
  1227. /package/fe/packages/react/{ui/components → core}/Label/Label.d.ts +0 -0
  1228. /package/{models/packages/react/ui/components → fe/packages/react/core}/Label/index.d.ts +0 -0
  1229. /package/fe/packages/react/{ui/components → core}/Layout/Layout.d.ts +0 -0
  1230. /package/{models/packages/react/ui/components → fe/packages/react/core}/Layout/index.d.ts +0 -0
  1231. /package/fe/packages/react/{ui/components → core}/Loading/Loading.d.ts +0 -0
  1232. /package/{models/packages/react/ui/components → fe/packages/react/core}/Loading/index.d.ts +0 -0
  1233. /package/fe/packages/react/{ui/components → core}/Skeleton/Skeleton.d.ts +0 -0
  1234. /package/{models/packages/react/ui/components → fe/packages/react/core}/Skeleton/index.d.ts +0 -0
  1235. /package/fe/packages/react/{ui/components → core}/breadcrumb/breadcrumb.d.ts +0 -0
  1236. /package/{models/packages/react/ui/components → fe/packages/react/core}/breadcrumb/index.d.ts +0 -0
  1237. /package/fe/packages/react/{ui/components → core}/hooks/useDropdownPositioning.d.ts +0 -0
  1238. /package/fe/packages/react/{hooks → core/hooks}/useExecuteOnce.d.ts +0 -0
  1239. /package/fe/packages/react/{hooks → core/hooks}/useInit.d.ts +0 -0
  1240. /package/fe/packages/react/{ui/components → core}/hooks/useInputController.d.ts +0 -0
  1241. /package/fe/packages/react/{hooks → core/hooks}/usePagination.d.ts +0 -0
  1242. /package/fe/packages/react/{hooks → core/hooks}/useRefState.d.ts +0 -0
  1243. /package/fe/packages/react/{hooks → core/hooks}/useSSR.d.ts +0 -0
  1244. /package/fe/packages/react/{hooks → core/hooks}/useWatch.d.ts +0 -0
  1245. /package/fe/packages/react/{ui → core}/lib/createStoreHook.d.ts +0 -0
  1246. /package/fe/packages/react/{ui/components/DataTable → core/lib}/dataTableWidth.d.ts +0 -0
  1247. /package/{models/packages/react/ui/components → fe/packages/react/core}/types/baseType.d.ts +0 -0
  1248. /package/fe/packages/react/{ui → core}/types/index.d.ts +0 -0
  1249. /package/fe/packages/react/{ui/components/testPage → dev/preview}/MenuTestPage.d.ts +0 -0
  1250. /package/fe/packages/react/{ui/components → forms}/Date/Calendar.d.ts +0 -0
  1251. /package/fe/packages/react/{ui/components → forms}/Date/Date.d.ts +0 -0
  1252. /package/fe/packages/react/{ui/components → forms}/Date/LocaleContext.d.ts +0 -0
  1253. /package/fe/packages/react/{ui/components → forms}/Date/LocaleProvider.d.ts +0 -0
  1254. /package/fe/packages/react/{ui/components → forms}/Date/TimePicker.d.ts +0 -0
  1255. /package/fe/packages/react/{ui/components → forms}/Date/data.d.ts +0 -0
  1256. /package/fe/packages/react/{ui/components → forms}/Date/dateLocaleStore.d.ts +0 -0
  1257. /package/{models/packages/react/ui/components → fe/packages/react/forms}/Date/index.d.ts +0 -0
  1258. /package/fe/packages/react/{ui/components → forms}/Form/Form.d.ts +0 -0
  1259. /package/fe/packages/react/{ui/components → forms}/Form/SchemaForm/defaultComponentsMap.d.ts +0 -0
  1260. /package/fe/packages/react/{ui/components → forms}/Form/useForm.d.ts +0 -0
  1261. /package/fe/packages/react/{ui/components → forms}/Form/useForm.js +0 -0
  1262. /package/fe/packages/react/{ui/components → forms}/Input/Input.d.ts +0 -0
  1263. /package/{models/packages/react/ui/components → fe/packages/react/forms}/Input/index.d.ts +0 -0
  1264. /package/{models/packages/react/ui/components → fe/packages/react/forms}/InputNumber/index.d.ts +0 -0
  1265. /package/fe/packages/react/{ui/components → forms}/InputNumber/inputNumberUtils.d.ts +0 -0
  1266. /package/fe/packages/react/{ui/components → forms}/Pagination/Pagination.d.ts +0 -0
  1267. /package/{models/packages/react/ui/components → fe/packages/react/forms}/Pagination/index.d.ts +0 -0
  1268. /package/fe/packages/react/{ui/components → forms}/Radio/Radio.d.ts +0 -0
  1269. /package/fe/packages/react/{ui/components → forms}/Radio/RadioGroup.d.ts +0 -0
  1270. /package/{models/packages/react/ui/components → fe/packages/react/forms}/Radio/index.d.ts +0 -0
  1271. /package/{models/packages/react/ui/components → fe/packages/react/forms}/Search/index.d.ts +0 -0
  1272. /package/fe/packages/react/{ui/components → forms}/Select/Select.d.ts +0 -0
  1273. /package/{models/packages/react/ui/components → fe/packages/react/forms}/Select/index.d.ts +0 -0
  1274. /package/fe/packages/react/{ui/components → forms}/Switch/Switch.d.ts +0 -0
  1275. /package/{models/packages/react/ui/components → fe/packages/react/forms}/Switch/index.d.ts +0 -0
  1276. /package/{models/packages/react/ui/components → fe/packages/react/forms}/TableSearch/index.d.ts +0 -0
  1277. /package/fe/packages/react/{ui/components → forms}/TableSearch/tableSearchLocaleStore.d.ts +0 -0
  1278. /package/fe/packages/react/{ui/components → forms}/Textarea/Textarea.d.ts +0 -0
  1279. /package/{models/packages/react/ui/components → fe/packages/react/forms}/Textarea/index.d.ts +0 -0
  1280. /package/fe/packages/react/{ui/components → forms}/TreeSelect/TreeSelect.d.ts +0 -0
  1281. /package/{models/packages/react/ui/components → fe/packages/react/forms}/TreeSelect/index.d.ts +0 -0
  1282. /package/fe/packages/react/{ui/components → forms}/Upload/ImageUpload.d.ts +0 -0
  1283. /package/fe/packages/react/{ui/components → forms}/Upload/Upload.d.ts +0 -0
  1284. /package/{models/packages/react/ui/components → fe/packages/react/forms}/Upload/index.d.ts +0 -0
  1285. /package/{models/packages/react/ui/components → fe/packages/react/forms}/table/index.d.ts +0 -0
  1286. /package/fe/packages/react/{ui/components → forms}/table/table.d.ts +0 -0
  1287. /package/fe/packages/react/{ui/components/ConfirmDialog → overlays/Dialog}/ConfirmDialog.d.ts +0 -0
  1288. /package/{models/packages/react/ui/components/ConfirmDialog → fe/packages/react/overlays/Dialog}/index.d.ts +0 -0
  1289. /package/fe/packages/react/{ui/components → overlays}/Drawer/Drawer.d.ts +0 -0
  1290. /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Drawer/index.d.ts +0 -0
  1291. /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Dropdown/index.d.ts +0 -0
  1292. /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/Menu.d.ts +0 -0
  1293. /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/MenuContext.d.ts +0 -0
  1294. /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/MenuItem.d.ts +0 -0
  1295. /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/SubMenu.d.ts +0 -0
  1296. /package/{models/packages/react/ui/components/Menu → fe/packages/react/overlays/DropdownMenu}/index.d.ts +0 -0
  1297. /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/menuTypes.d.ts +0 -0
  1298. /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/utils.d.ts +0 -0
  1299. /package/fe/packages/react/{ui/components → overlays}/Message/Message.d.ts +0 -0
  1300. /package/fe/packages/react/{ui/components → overlays}/Message/MessageManager.d.ts +0 -0
  1301. /package/fe/packages/react/{ui/components → overlays}/Message/data.d.ts +0 -0
  1302. /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Message/index.d.ts +0 -0
  1303. /package/fe/packages/react/{ui/components → overlays}/Modal/Modal.d.ts +0 -0
  1304. /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Modal/index.d.ts +0 -0
  1305. /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Overlay/Overlay.d.ts +0 -0
  1306. /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Overlay/index.d.ts +0 -0
  1307. /package/fe/packages/react/{ui/components/Notification → overlays/Popover}/Notification.d.ts +0 -0
  1308. /package/{models/packages/react/ui/components/Notification → fe/packages/react/overlays/Popover}/index.d.ts +0 -0
  1309. /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Popup/index.d.ts +0 -0
  1310. /package/fe/packages/react/{ui/components → overlays}/Tooltip/Tooltip.d.ts +0 -0
  1311. /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Tooltip/index.d.ts +0 -0
  1312. /package/models/packages/react/{ui/components → core}/Button/Button.d.ts +0 -0
  1313. /package/models/packages/react/{ui/components → core}/Card/Card.d.ts +0 -0
  1314. /package/models/packages/react/{ui/components → core}/Checkbox/Checkbox.d.ts +0 -0
  1315. /package/models/packages/react/{ui/components → core}/Label/Label.d.ts +0 -0
  1316. /package/models/packages/react/{ui/components → core}/Layout/Layout.d.ts +0 -0
  1317. /package/models/packages/react/{ui/components → core}/Loading/Loading.d.ts +0 -0
  1318. /package/models/packages/react/{ui/components → core}/Skeleton/Skeleton.d.ts +0 -0
  1319. /package/models/packages/react/{ui/components → core}/breadcrumb/breadcrumb.d.ts +0 -0
  1320. /package/models/packages/react/{ui/components → core}/hooks/useDropdownPositioning.d.ts +0 -0
  1321. /package/models/packages/react/{hooks → core/hooks}/useExecuteOnce.d.ts +0 -0
  1322. /package/models/packages/react/{ui/components → core}/hooks/useInputController.d.ts +0 -0
  1323. /package/models/packages/react/{ui → core}/lib/createStoreHook.d.ts +0 -0
  1324. /package/models/packages/react/{ui/components/DataTable → core/lib}/dataTableWidth.d.ts +0 -0
  1325. /package/models/packages/react/{ui → core}/types/index.d.ts +0 -0
  1326. /package/models/packages/react/{ui/components → forms}/Date/Calendar.d.ts +0 -0
  1327. /package/models/packages/react/{ui/components → forms}/Date/Date.d.ts +0 -0
  1328. /package/models/packages/react/{ui/components → forms}/Date/LocaleContext.d.ts +0 -0
  1329. /package/models/packages/react/{ui/components → forms}/Date/LocaleProvider.d.ts +0 -0
  1330. /package/models/packages/react/{ui/components → forms}/Date/TimePicker.d.ts +0 -0
  1331. /package/models/packages/react/{ui/components → forms}/Date/data.d.ts +0 -0
  1332. /package/models/packages/react/{ui/components → forms}/Date/dateLocaleStore.d.ts +0 -0
  1333. /package/models/packages/react/{ui/components → forms}/Form/Form.d.ts +0 -0
  1334. /package/models/packages/react/{ui/components → forms}/Form/useForm.d.ts +0 -0
  1335. /package/models/packages/react/{ui/components → forms}/Input/Input.d.ts +0 -0
  1336. /package/models/packages/react/{ui/components → forms}/InputNumber/inputNumberUtils.d.ts +0 -0
  1337. /package/models/packages/react/{ui/components → forms}/Pagination/Pagination.d.ts +0 -0
  1338. /package/models/packages/react/{ui/components → forms}/Radio/Radio.d.ts +0 -0
  1339. /package/models/packages/react/{ui/components → forms}/Radio/RadioGroup.d.ts +0 -0
  1340. /package/models/packages/react/{ui/components → forms}/Select/Select.d.ts +0 -0
  1341. /package/models/packages/react/{ui/components → forms}/Switch/Switch.d.ts +0 -0
  1342. /package/models/packages/react/{ui/components → forms}/TableSearch/tableSearchLocaleStore.d.ts +0 -0
  1343. /package/models/packages/react/{ui/components → forms}/Textarea/Textarea.d.ts +0 -0
  1344. /package/models/packages/react/{ui/components → forms}/TreeSelect/TreeSelect.d.ts +0 -0
  1345. /package/models/packages/react/{ui/components → forms}/Upload/ImageUpload.d.ts +0 -0
  1346. /package/models/packages/react/{ui/components → forms}/Upload/Upload.d.ts +0 -0
  1347. /package/models/packages/react/{ui/components → forms}/table/table.d.ts +0 -0
  1348. /package/models/packages/react/{ui/components/ConfirmDialog → overlays/Dialog}/ConfirmDialog.d.ts +0 -0
  1349. /package/models/packages/react/{ui/components → overlays}/Drawer/Drawer.d.ts +0 -0
  1350. /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/Menu.d.ts +0 -0
  1351. /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/MenuContext.d.ts +0 -0
  1352. /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/MenuItem.d.ts +0 -0
  1353. /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/SubMenu.d.ts +0 -0
  1354. /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/menuTypes.d.ts +0 -0
  1355. /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/utils.d.ts +0 -0
  1356. /package/models/packages/react/{ui/components → overlays}/Message/Message.d.ts +0 -0
  1357. /package/models/packages/react/{ui/components → overlays}/Message/MessageManager.d.ts +0 -0
  1358. /package/models/packages/react/{ui/components → overlays}/Message/data.d.ts +0 -0
  1359. /package/models/packages/react/{ui/components → overlays}/Modal/Modal.d.ts +0 -0
  1360. /package/models/packages/react/{ui/components/Notification → overlays/Popover}/Notification.d.ts +0 -0
  1361. /package/models/packages/react/{ui/components → overlays}/Tooltip/Tooltip.d.ts +0 -0
@@ -0,0 +1,52 @@
1
+ import { resolveTokenizerEncoding as e } from "./request-budget.js";
2
+ import { ChatOpenAI as t } from "@langchain/openai";
3
+ //#region app/ai/runtime/internal/load-llm-config.ts
4
+ var n = "xxxx";
5
+ function r(e) {
6
+ let t = e.get("ai");
7
+ if (!t?.llm) throw Error("ai.llm config is missing");
8
+ return t.llm;
9
+ }
10
+ function i(e, t) {
11
+ if (t === void 0 || t.trim() === "" || t === n) throw Error(`LLM model "${e}" apiKey is missing or still using placeholder "${n}"`);
12
+ return t;
13
+ }
14
+ function a(e, t) {
15
+ let { contextWindowTokens: n, responseReserveTokens: r } = t;
16
+ if (typeof n != "number" || !Number.isSafeInteger(n) || n <= 0) throw Error(`LLM model "${e}" contextWindowTokens must be a positive safe integer`);
17
+ if (typeof r != "number" || !Number.isSafeInteger(r) || r < 0 || r >= n) throw Error(`LLM model "${e}" responseReserveTokens must be a non-negative safe integer less than contextWindowTokens`);
18
+ return {
19
+ contextWindowTokens: n,
20
+ responseReserveTokens: r
21
+ };
22
+ }
23
+ function o(e, n, r) {
24
+ let i = typeof n.model == "string" && n.model !== "" ? n.model : e, a = typeof n.baseURL == "string" ? n.baseURL.replace(/\/+$/, "") : void 0;
25
+ return new t({
26
+ model: i,
27
+ apiKey: r,
28
+ ...a ? { configuration: { baseURL: a } } : {}
29
+ });
30
+ }
31
+ function s(t, n) {
32
+ let s = r(t), c = n ?? s.default, l = s.models?.[c];
33
+ if (!l) throw Error(`LLM model "${c}" is not configured in ai.llm.models`);
34
+ let u = a(c, l), d = typeof l.model == "string" && l.model !== "" ? l.model : c, f = e(d, l.tokenizerEncoding);
35
+ if (typeof l.use == "function") return {
36
+ kind: "custom",
37
+ provider: new l.use(l),
38
+ modelName: d,
39
+ ...u,
40
+ ...f ? { tokenizerEncoding: f } : {}
41
+ };
42
+ if (l.provider === "openai-compatible") return {
43
+ kind: "langchain",
44
+ model: o(c, l, i(c, l.apiKey)),
45
+ modelName: d,
46
+ ...u,
47
+ ...f ? { tokenizerEncoding: f } : {}
48
+ };
49
+ throw Error(`Unsupported LLM provider "${l.provider ?? "unknown"}" for model "${c}"`);
50
+ }
51
+ //#endregion
52
+ export { s as resolveLlm };
@@ -0,0 +1,12 @@
1
+ //#region app/ai/runtime/internal/load-runtime-config.ts
2
+ var e = 5, t = 2;
3
+ function n(e) {
4
+ let t = e.get("ai.runtime.maxIterations");
5
+ return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? 5 : Math.floor(t);
6
+ }
7
+ function r(e) {
8
+ let t = e.get("ai.runtime.maxDelegationDepth");
9
+ return typeof t != "number" || !Number.isFinite(t) || t < 0 ? 2 : Math.floor(t);
10
+ }
11
+ //#endregion
12
+ export { t as DEFAULT_RUNTIME_MAX_DELEGATION_DEPTH, e as DEFAULT_RUNTIME_MAX_ITERATIONS, r as resolveMaxDelegationDepth, n as resolveMaxIterations };
@@ -0,0 +1,152 @@
1
+ import { Tiktoken as e, getEncodingNameForModel as t } from "js-tiktoken/lite";
2
+ //#region app/ai/runtime/internal/request-budget.ts
3
+ var n = .8, r = .6, i = 16, a = 32, o = 32, s = [
4
+ "cl100k_base",
5
+ "o200k_base",
6
+ "p50k_base",
7
+ "p50k_edit",
8
+ "r50k_base",
9
+ "gpt2"
10
+ ], c = /* @__PURE__ */ new Map();
11
+ function l(e, n) {
12
+ if (n !== void 0) {
13
+ if (typeof n != "string" || !s.includes(n)) throw Error(`[ai] tokenizerEncoding for model "${e}" is unsupported`);
14
+ return n;
15
+ }
16
+ try {
17
+ return t(e);
18
+ } catch {
19
+ return;
20
+ }
21
+ }
22
+ async function u(t) {
23
+ let n = c.get(t);
24
+ return n || (n = (async () => {
25
+ switch (t) {
26
+ case "cl100k_base": {
27
+ let { default: t } = await import("js-tiktoken/ranks/cl100k_base");
28
+ return new e(t);
29
+ }
30
+ case "o200k_base": {
31
+ let { default: t } = await import("js-tiktoken/ranks/o200k_base");
32
+ return new e(t);
33
+ }
34
+ case "p50k_base": {
35
+ let { default: t } = await import("js-tiktoken/ranks/p50k_base");
36
+ return new e(t);
37
+ }
38
+ case "p50k_edit": {
39
+ let { default: t } = await import("js-tiktoken/ranks/p50k_edit");
40
+ return new e(t);
41
+ }
42
+ case "r50k_base": {
43
+ let { default: t } = await import("js-tiktoken/ranks/r50k_base");
44
+ return new e(t);
45
+ }
46
+ case "gpt2": {
47
+ let { default: t } = await import("js-tiktoken/ranks/gpt2");
48
+ return new e(t);
49
+ }
50
+ }
51
+ })(), c.set(t, n)), n;
52
+ }
53
+ async function d(e, t, n) {
54
+ let r = await u(n);
55
+ return r.decode(r.encode(e, [], []).slice(0, t));
56
+ }
57
+ function f(e) {
58
+ return typeof e == "object" && !!e && !Array.isArray(e);
59
+ }
60
+ function p(e, t, n, r = !1) {
61
+ if (e === void 0 && r || e === null || typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e)) return;
62
+ if (typeof e != "object") throw Error(`[ai] request payload cannot be counted at ${t}`);
63
+ if (n.has(e)) throw Error(`[ai] request payload cannot be counted at ${t}: circular value`);
64
+ let i = Object.getPrototypeOf(e);
65
+ if (!Array.isArray(e) && i !== Object.prototype && i !== null) throw Error(`[ai] request payload cannot be counted at ${t}: unsupported object`);
66
+ if (n.add(e), Array.isArray(e)) e.forEach((e, r) => p(e, `${t}[${r}]`, n));
67
+ else for (let [r, i] of Object.entries(e)) p(i, `${t}.${r}`, n, !0);
68
+ n.delete(e);
69
+ }
70
+ function m(e) {
71
+ if (!Array.isArray(e.messages) || !Array.isArray(e.tools)) throw Error("[ai] request payload cannot be counted: messages and tools must be arrays");
72
+ for (let [t, n] of e.messages.entries()) {
73
+ if (!f(n) || typeof n.content != "string") throw Error(`[ai] request payload cannot be counted: messages[${t}].content must be text; non-text inputs are not supported`);
74
+ p(n, `messages[${t}]`, /* @__PURE__ */ new WeakSet());
75
+ }
76
+ p(e.tools, "tools", /* @__PURE__ */ new WeakSet());
77
+ }
78
+ function h(e) {
79
+ m(e);
80
+ let t;
81
+ try {
82
+ t = JSON.stringify({
83
+ messages: e.messages,
84
+ tools: e.tools
85
+ });
86
+ } catch {
87
+ throw Error("[ai] request payload cannot be counted: serialization failed");
88
+ }
89
+ if (typeof t != "string") throw Error("[ai] request payload cannot be counted: serialization failed");
90
+ return new TextEncoder().encode(t).length + o + e.messages.length * i + e.tools.length * a;
91
+ }
92
+ async function g(e, t) {
93
+ m(e);
94
+ let n = JSON.stringify({
95
+ messages: e.messages,
96
+ tools: e.tools
97
+ });
98
+ if (typeof n != "string") throw Error("[ai] request payload cannot be counted: serialization failed");
99
+ return (await u(t)).encode(n, [], []).length + o + e.messages.length * i + e.tools.length * a;
100
+ }
101
+ async function _(e) {
102
+ let t = {
103
+ model: e.model,
104
+ messages: e.messages,
105
+ tools: e.tools
106
+ };
107
+ m(t);
108
+ let n = e.countRequestTokens ? "provider-exact" : e.estimateRequestTokens ? "provider-estimate" : e.tokenizerEncoding ? "model-estimate" : "conservative-estimate", r = e.countRequestTokens ? await e.countRequestTokens(t) : e.estimateRequestTokens ? await e.estimateRequestTokens(t) : e.tokenizerEncoding ? await g(t, e.tokenizerEncoding) : h(t);
109
+ if (!Number.isSafeInteger(r) || r < 0) throw Error(`[ai] model "${e.model}" returned an invalid request token count`);
110
+ return {
111
+ countedInputTokens: r,
112
+ countMethod: n
113
+ };
114
+ }
115
+ function v(e, t, n) {
116
+ let r = e.get(t);
117
+ if (r === void 0) return n;
118
+ if (typeof r != "number" || !Number.isFinite(r) || r <= 0 || r >= 1) throw Error(`[ai] ${t} must be a number greater than 0 and less than 1`);
119
+ return r;
120
+ }
121
+ function y(e) {
122
+ let t = v(e, "ai.runtime.contextBudget.compressionTriggerRatio", n), i = v(e, "ai.runtime.contextBudget.compressionTargetRatio", r);
123
+ if (i >= t) throw Error("[ai] ai.runtime.contextBudget.compressionTargetRatio must be less than compressionTriggerRatio");
124
+ return {
125
+ triggerRatio: t,
126
+ targetRatio: i
127
+ };
128
+ }
129
+ async function b(e, t = {}) {
130
+ let { contextWindowTokens: n, responseReserveTokens: r } = e, i = n - r;
131
+ if (i <= 0) throw Error(`[ai] model "${e.model}" has no input budget after response reserve`);
132
+ let { countedInputTokens: a, countMethod: o } = await _({
133
+ model: e.model,
134
+ messages: e.messages,
135
+ tools: e.tools,
136
+ ...e.countRequestTokens ? { countRequestTokens: e.countRequestTokens } : {},
137
+ ...e.estimateRequestTokens ? { estimateRequestTokens: e.estimateRequestTokens } : {},
138
+ ...e.tokenizerEncoding ? { tokenizerEncoding: e.tokenizerEncoding } : {}
139
+ }), s = Math.ceil(i * e.thresholds.triggerRatio), c = Math.floor(i * e.thresholds.targetRatio), l = {
140
+ model: e.model,
141
+ countedInputTokens: a,
142
+ inputBudgetTokens: i,
143
+ countMethod: o,
144
+ compressionTriggerTokens: s,
145
+ compressionTargetTokens: c,
146
+ compressionTriggered: a >= s
147
+ };
148
+ if (!t.allowOverBudget && a > i) throw Error(`[ai] LLM request input budget exceeded for model "${e.model}": ${a} tokens (${o}) exceeds the ${i}-token input budget`);
149
+ return l;
150
+ }
151
+ //#endregion
152
+ export { r as DEFAULT_COMPRESSION_TARGET_RATIO, n as DEFAULT_COMPRESSION_TRIGGER_RATIO, b as countRequestBudget, _ as countRequestTokens, y as resolveContextCompressionThresholds, l as resolveTokenizerEncoding, d as takeModelTokenPrefix };
@@ -0,0 +1,23 @@
1
+ //#region app/ai/runtime/internal/run-event-queue.ts
2
+ var e = class {
3
+ pending = [];
4
+ wake;
5
+ ended = !1;
6
+ push(e) {
7
+ this.pending.push(e), this.notify();
8
+ }
9
+ close() {
10
+ this.ended = !0, this.notify();
11
+ }
12
+ async *events() {
13
+ for (; !this.ended || this.pending.length > 0;) this.pending.length > 0 ? yield this.pending.shift() : await new Promise((e) => {
14
+ this.wake = e, (this.ended || this.pending.length > 0) && this.notify();
15
+ });
16
+ }
17
+ notify() {
18
+ let e = this.wake;
19
+ this.wake = void 0, e?.();
20
+ }
21
+ };
22
+ //#endregion
23
+ export { e as RunEventQueue };
@@ -0,0 +1,195 @@
1
+ import { AiConfigService as e } from "../../ai-config.service.js";
2
+ import { countRequestBudget as t, resolveContextCompressionThresholds as n } from "../internal/request-budget.js";
3
+ import { resolveLlm as r } from "../internal/load-llm-config.js";
4
+ import { Injectable as i } from "@nestjs/common";
5
+ import a from "@oxc-project/runtime/helpers/decorateMetadata";
6
+ import o from "@oxc-project/runtime/helpers/decorate";
7
+ import { randomUUID as s } from "crypto";
8
+ import { AIMessage as c, HumanMessage as l, SystemMessage as u, ToolMessage as d } from "@langchain/core/messages";
9
+ import { convertToOpenAITool as f } from "@langchain/core/utils/function_calling";
10
+ //#region app/ai/runtime/langchain/langchain-planner.service.ts
11
+ var p;
12
+ function m(e) {
13
+ return typeof e == "object" && !!e && !Array.isArray(e);
14
+ }
15
+ function h(e) {
16
+ return typeof e == "string" ? e : Array.isArray(e) ? e.map((e) => typeof e == "string" ? e : m(e) && typeof e.text == "string" ? e.text : "").join("") : "";
17
+ }
18
+ function g(e) {
19
+ if (typeof e == "string") try {
20
+ return JSON.parse(e);
21
+ } catch {
22
+ return {};
23
+ }
24
+ return m(e) ? e : {};
25
+ }
26
+ function _() {
27
+ return `call_${s().replace(/-/g, "")}`;
28
+ }
29
+ function v(e) {
30
+ return e.map((e) => {
31
+ let t = e.schema;
32
+ return {
33
+ type: "function",
34
+ function: {
35
+ name: e.name,
36
+ description: e.description,
37
+ parameters: m(t) ? t : {}
38
+ }
39
+ };
40
+ });
41
+ }
42
+ function y(e) {
43
+ return e.map((e) => {
44
+ let t = f(e);
45
+ return {
46
+ type: t.type,
47
+ function: t.function
48
+ };
49
+ });
50
+ }
51
+ function b(e) {
52
+ let t = e.tool_calls;
53
+ return !t || t.length === 0 ? e : {
54
+ ...e,
55
+ tool_calls: t.map((e) => ({
56
+ ...e,
57
+ id: typeof e.id == "string" && e.id !== "" ? e.id : _(),
58
+ type: typeof e.type == "string" && e.type !== "" ? e.type : "function"
59
+ }))
60
+ };
61
+ }
62
+ function x(e) {
63
+ return {
64
+ id: e.id ?? _(),
65
+ name: e.function.name,
66
+ args: g(e.function.arguments)
67
+ };
68
+ }
69
+ function S(e) {
70
+ return e.map((e) => e.role === "system" ? new u(e.content) : e.role === "user" ? new l(e.content) : e.role === "tool" ? new d({
71
+ content: e.content,
72
+ tool_call_id: e.tool_call_id ?? ""
73
+ }) : new c({
74
+ content: e.content,
75
+ ...e.tool_calls && e.tool_calls.length > 0 ? { tool_calls: e.tool_calls.map(x) } : {}
76
+ }));
77
+ }
78
+ function C(e) {
79
+ let t = (e.tool_calls ?? []).map((e) => ({
80
+ id: typeof e.id == "string" && e.id !== "" ? e.id : _(),
81
+ name: e.name,
82
+ args: g(e.args)
83
+ }));
84
+ return {
85
+ content: h(e.content),
86
+ toolCalls: t
87
+ };
88
+ }
89
+ function w(e, t) {
90
+ return {
91
+ role: "assistant",
92
+ content: e,
93
+ ...t.length > 0 ? { tool_calls: t.map((e) => ({
94
+ id: e.id,
95
+ type: "function",
96
+ function: {
97
+ name: e.name,
98
+ arguments: JSON.stringify(e.args ?? {})
99
+ }
100
+ })) } : {}
101
+ };
102
+ }
103
+ var T = class {
104
+ constructor(e) {
105
+ this.configService = e;
106
+ }
107
+ async inspectRequest(e, t, n = {}) {
108
+ let r = await this.prepareRequest(e, t, n.model, !0);
109
+ return {
110
+ requestBudget: r.requestBudget,
111
+ requestCounter: r.requestCounter
112
+ };
113
+ }
114
+ async plan(e, t, n = {}) {
115
+ let { resolved: r, toolSchemas: i, requestBudget: a, requestCounter: o } = await this.prepareRequest(e, t, n.model, !1);
116
+ if (r.kind === "custom") return this.planWithProvider(r.provider, e, i, n, a, o);
117
+ let s = r.model, c = t.length > 0 ? s.bindTools(t) : s, l = S(e), u = n.onDelta ? await this.stream(c, l, n.onDelta) : C(await c.invoke(l)), d = w(u.content, u.toolCalls);
118
+ return u.toolCalls.length > 0 ? {
119
+ kind: "tool",
120
+ message: d,
121
+ toolCalls: u.toolCalls,
122
+ requestBudget: a,
123
+ requestCounter: o
124
+ } : {
125
+ kind: "final",
126
+ message: d,
127
+ finalAnswer: u.content,
128
+ requestBudget: a,
129
+ requestCounter: o
130
+ };
131
+ }
132
+ async prepareRequest(e, i, a, o) {
133
+ let s = r(this.configService, a), c = s.kind === "custom" ? v(i) : y(i), l = s.kind === "custom" ? s.provider.countRequestTokens?.bind(s.provider) : void 0, u = s.kind === "custom" ? s.provider.estimateRequestTokens?.bind(s.provider) : void 0;
134
+ if (!l && !u && !s.tokenizerEncoding) throw Error(`[ai] model "${s.modelName}" needs tokenizerEncoding or a Provider token estimator`);
135
+ let d = {
136
+ model: s.modelName,
137
+ ...s.tokenizerEncoding ? { tokenizerEncoding: s.tokenizerEncoding } : {},
138
+ ...l ? { countRequestTokens: l } : {},
139
+ ...u ? { estimateRequestTokens: u } : {}
140
+ };
141
+ return {
142
+ resolved: s,
143
+ toolSchemas: c,
144
+ requestBudget: await t({
145
+ model: s.modelName,
146
+ contextWindowTokens: s.contextWindowTokens,
147
+ responseReserveTokens: s.responseReserveTokens,
148
+ messages: e,
149
+ tools: c,
150
+ thresholds: n(this.configService),
151
+ ...s.tokenizerEncoding ? { tokenizerEncoding: s.tokenizerEncoding } : {},
152
+ ...l ? { countRequestTokens: l } : {},
153
+ ...u ? { estimateRequestTokens: u } : {}
154
+ }, { allowOverBudget: o }),
155
+ requestCounter: d
156
+ };
157
+ }
158
+ async planWithProvider(e, t, n, r, i, a) {
159
+ let o = b(await e.chat(t, {
160
+ ...r.model ? { model: r.model } : {},
161
+ ...n.length > 0 ? { tools: n } : {}
162
+ }));
163
+ o.content !== "" && r.onDelta && r.onDelta(o.content);
164
+ let s = (o.tool_calls ?? []).map((e) => ({
165
+ id: typeof e.id == "string" && e.id !== "" ? e.id : _(),
166
+ name: e.function.name,
167
+ args: g(e.function.arguments)
168
+ }));
169
+ return s.length > 0 ? {
170
+ kind: "tool",
171
+ message: o,
172
+ toolCalls: s,
173
+ requestBudget: i,
174
+ requestCounter: a
175
+ } : {
176
+ kind: "final",
177
+ message: o,
178
+ finalAnswer: o.content,
179
+ requestBudget: i,
180
+ requestCounter: a
181
+ };
182
+ }
183
+ async stream(e, t, n) {
184
+ let r = await e.stream(t), i;
185
+ for await (let e of r) {
186
+ let t = h(e.content);
187
+ t !== "" && n(t), i = i ? i.concat(e) : e;
188
+ }
189
+ if (!i) throw Error("[ai] langchain 流式返回为空");
190
+ return C(i);
191
+ }
192
+ };
193
+ T = o([i(), a("design:paramtypes", [typeof (p = e !== void 0 && e) == "function" ? p : Object])], T);
194
+ //#endregion
195
+ export { T as LangChainPlannerService };
@@ -0,0 +1,29 @@
1
+ import { tool as e } from "@langchain/core/tools";
2
+ //#region app/ai/runtime/langchain/skill-tool.adapter.ts
3
+ function t(t, n, r, i) {
4
+ return e(async (e) => {
5
+ let n = i.skillScanner.get(t);
6
+ if (n) return n.execute(e, {});
7
+ let r = i.toolRegistry.get(t);
8
+ if (r) return r.execute(e);
9
+ throw Error(`[lc-lg] 未注册的 skill / tool:${t}`);
10
+ }, {
11
+ name: t,
12
+ description: n,
13
+ schema: r
14
+ });
15
+ }
16
+ function n(e, n) {
17
+ let r = [];
18
+ for (let i of e) {
19
+ let e = n.skillScanner.get(i) ?? n.toolRegistry.get(i);
20
+ if (!e) {
21
+ console.log(`[ai] lc-lg 声明的 tool/skill 未注册:${i}`);
22
+ continue;
23
+ }
24
+ r.push(t(e.name, e.description, e.inputSchema, n));
25
+ }
26
+ return r;
27
+ }
28
+ //#endregion
29
+ export { n as toStructuredTools };
@@ -0,0 +1,157 @@
1
+ import { compactToolObservation as e } from "../internal/compact-tool-result.js";
2
+ import { AgentStateAnnotation as t, hasOutput as n } from "./agent.state.js";
3
+ import { END as r, START as i, StateGraph as a } from "@langchain/langgraph";
4
+ //#region app/ai/runtime/langgraph/agent.graph.ts
5
+ var o = [
6
+ "plan",
7
+ "execute",
8
+ "observe"
9
+ ], s = [
10
+ {
11
+ from: "START",
12
+ to: "plan"
13
+ },
14
+ {
15
+ from: "plan",
16
+ to: "execute",
17
+ condition: "toolCalls 非空"
18
+ },
19
+ {
20
+ from: "plan",
21
+ to: "END",
22
+ condition: "finalAnswer"
23
+ },
24
+ {
25
+ from: "execute",
26
+ to: "observe"
27
+ },
28
+ {
29
+ from: "observe",
30
+ to: "plan",
31
+ condition: "iteration < maxIterations"
32
+ },
33
+ {
34
+ from: "observe",
35
+ to: "END",
36
+ condition: "iteration >= maxIterations"
37
+ }
38
+ ];
39
+ function c(e, t, n) {
40
+ let r = e.kind === "tool" ? e.toolCalls : [];
41
+ return {
42
+ type: "plan",
43
+ iteration: t,
44
+ planner: "langchain",
45
+ node: "plan",
46
+ content: n,
47
+ requestBudget: e.requestBudget,
48
+ ...r.length > 0 ? { toolCalls: r.map((e) => ({
49
+ id: e.id,
50
+ name: e.name,
51
+ arguments: JSON.stringify(e.args ?? {})
52
+ })) } : {}
53
+ };
54
+ }
55
+ function l(o) {
56
+ let s = { model: o.model ?? "unknown" };
57
+ return new a(t).addNode("plan", async (e) => {
58
+ let t = e.iteration + 1, r = (/* @__PURE__ */ new Date()).toISOString(), i = o.prepareMessages ? await o.prepareMessages(e.messages, o.tools, o.record) : e.messages, a = i !== e.messages, l = await o.planner.plan(i, o.tools, {
59
+ ...o.model ? { model: o.model } : {},
60
+ ...o.onDelta ? { onDelta: o.onDelta } : {}
61
+ });
62
+ if (s = l.requestCounter ?? s, await o.record({
63
+ ...c(l, t, l.message.content),
64
+ startedAt: r,
65
+ endedAt: (/* @__PURE__ */ new Date()).toISOString()
66
+ }), l.kind === "final") {
67
+ let r = n(l.finalAnswer) ? l.finalAnswer : n(e.output) ? e.output : e.lastContent;
68
+ return await o.record({
69
+ type: "final",
70
+ iteration: t,
71
+ node: "plan",
72
+ content: r
73
+ }), {
74
+ iteration: t,
75
+ messages: a ? { replace: [...i, l.message] } : [l.message],
76
+ lastContent: l.message.content,
77
+ output: r,
78
+ finished: !0,
79
+ pendingToolCalls: []
80
+ };
81
+ }
82
+ return {
83
+ iteration: t,
84
+ messages: a ? { replace: [...i, l.message] } : [l.message],
85
+ lastContent: l.message.content,
86
+ finished: !1,
87
+ pendingToolCalls: l.toolCalls
88
+ };
89
+ }).addNode("execute", async (e) => ({ observations: await Promise.all(e.pendingToolCalls.map(async (t) => {
90
+ let n = (/* @__PURE__ */ new Date()).toISOString(), r = await o.executor.execute(t.name, t.args), i = r.kind === "tool" && r.source === "builtin" && r.name === "invoke_agent";
91
+ return (!i || !r.ok) && await o.record({
92
+ type: i ? "delegation" : r.kind === "skill" ? "skill" : "tool",
93
+ iteration: e.iteration,
94
+ node: "execute",
95
+ name: r.name,
96
+ source: r.source,
97
+ input: r.input,
98
+ output: r.output,
99
+ error: r.error,
100
+ startedAt: n,
101
+ endedAt: (/* @__PURE__ */ new Date()).toISOString(),
102
+ ...i ? { status: "error" } : {}
103
+ }), {
104
+ toolCallId: t.id,
105
+ name: r.name,
106
+ result: r
107
+ };
108
+ })) })).addNode("observe", async (t) => {
109
+ let n = await Promise.all(t.observations.map(async (t) => {
110
+ let n = await e(t.result, {
111
+ ...s,
112
+ ...o.getObservationOptions?.(t.name) ?? {}
113
+ });
114
+ return {
115
+ ...t,
116
+ ...n
117
+ };
118
+ })), r = n.map((e) => ({
119
+ role: "tool",
120
+ tool_call_id: e.toolCallId,
121
+ content: e.content
122
+ }));
123
+ for (let e of n) await o.record({
124
+ type: "observe",
125
+ iteration: t.iteration,
126
+ node: "observe",
127
+ name: e.name,
128
+ content: e.content,
129
+ observation: {
130
+ completeness: e.completeness,
131
+ maxTokens: e.maxTokens,
132
+ countedTokens: e.countedTokens,
133
+ originalCountedTokens: e.originalCountedTokens,
134
+ countMethod: e.countMethod
135
+ }
136
+ });
137
+ if (t.iteration >= o.maxIterations) {
138
+ let e = t.lastContent.trim() === "" ? `达到最大轮次(${o.maxIterations})` : t.lastContent;
139
+ return await o.record({
140
+ type: "final",
141
+ iteration: t.iteration,
142
+ node: "observe",
143
+ content: e
144
+ }), {
145
+ messages: r,
146
+ observations: [],
147
+ output: e
148
+ };
149
+ }
150
+ return {
151
+ messages: r,
152
+ observations: []
153
+ };
154
+ }).addEdge(i, "plan").addConditionalEdges("plan", (e) => e.finished ? r : "execute", [r, "execute"]).addEdge("execute", "observe").addConditionalEdges("observe", (e) => e.iteration >= o.maxIterations ? r : "plan", [r, "plan"]).compile();
155
+ }
156
+ //#endregion
157
+ export { s as AGENT_GRAPH_EDGES, o as AGENT_GRAPH_NODES, l as buildAgentGraph };
@@ -0,0 +1,37 @@
1
+ import { Annotation as e } from "@langchain/langgraph";
2
+ //#region app/ai/runtime/langgraph/agent.state.ts
3
+ function t(e) {
4
+ return typeof e == "string" && e.trim() !== "" && e.trim() !== "Reached maximum iterations without a final answer.";
5
+ }
6
+ var n = e.Root({
7
+ messages: e({
8
+ reducer: (e, t) => Array.isArray(t) ? e.concat(t) : t.replace,
9
+ default: () => []
10
+ }),
11
+ iteration: e({
12
+ reducer: (e, t) => t,
13
+ default: () => 0
14
+ }),
15
+ pendingToolCalls: e({
16
+ reducer: (e, t) => t,
17
+ default: () => []
18
+ }),
19
+ observations: e({
20
+ reducer: (e, t) => t,
21
+ default: () => []
22
+ }),
23
+ lastContent: e({
24
+ reducer: (e, n) => t(n) ? n : e,
25
+ default: () => ""
26
+ }),
27
+ output: e({
28
+ reducer: (e, n) => t(n) ? n : e,
29
+ default: () => ""
30
+ }),
31
+ finished: e({
32
+ reducer: (e, t) => t,
33
+ default: () => !1
34
+ })
35
+ });
36
+ //#endregion
37
+ export { n as AgentStateAnnotation, t as hasOutput };