@_tc/template-core 0.3.2 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.skills/tc-component-usage-skills/SKILL.md +46 -121
- package/.skills/tc-component-usage-skills/reference/component-api.md +58 -25
- package/.skills/tc-component-usage-skills/reference/examples.md +30 -12
- package/.skills/tc-component-usage-skills/reference/patterns.md +45 -27
- package/.skills/tc-component-usage-skills/reference/template-core-frontend.md +27 -9
- package/.skills/tc-generator/SKILL.md +51 -69
- package/.skills/tc-generator/reference/example.md +150 -99
- package/.skills/tc-generator/reference/model-schema.md +4 -4
- package/.skills/tc-generator/reference/project-template/backend/business.module.ts +9 -0
- package/.skills/tc-generator/reference/project-template/backend/product.controller.ts +71 -0
- package/.skills/tc-generator/reference/project-template/backend/product.service.ts +58 -0
- package/.skills/tc-generator/reference/project-template/backend/product.types.ts +15 -0
- package/.skills/tc-generator/reference/project-template/index.js +32 -13
- package/.skills/tc-generator/reference/project-template/package.json +20 -3
- package/.skills/tc-generator/reference/project-template/scripts/build-backend.mjs +12 -0
- package/.skills/tc-generator/reference/project-template/scripts/build-frontend.mjs +7 -0
- package/.skills/tc-generator/reference/project-template/scripts/build-ssr.mjs +7 -0
- package/.skills/tc-generator/reference/project-template/ssr/apps/hello/hello.entry.tsx +44 -0
- package/.skills/tc-generator/reference/project-template/tsconfig.json +14 -0
- package/.skills/tc-generator/reference/runtime-extensions.md +142 -89
- package/AGENT_README.md +69 -156
- package/CHANGE.md +31 -12
- package/README.md +383 -357
- package/cjs/app/ai/agent/agent-scanner.service.js +1 -0
- package/cjs/app/ai/agent/agent.module.js +1 -0
- package/cjs/app/ai/ai-config.module.js +1 -0
- package/cjs/app/ai/ai-config.service.js +1 -0
- package/cjs/app/ai/ai.controller.js +1 -0
- package/cjs/app/ai/ai.module.js +1 -0
- package/cjs/app/ai/declaration-paths.js +1 -0
- package/cjs/app/ai/eval/assertions.js +1 -0
- package/cjs/app/ai/guardrail/guardrail.module.js +1 -0
- package/cjs/app/ai/guardrail/guardrail.service.js +1 -0
- package/cjs/app/ai/guardrail/internal/load-guardrail-config.js +1 -0
- package/cjs/app/ai/index.js +1 -0
- package/cjs/app/ai/mcp/internal/load-mcp-config.js +1 -0
- package/cjs/app/ai/mcp/internal/read-sse-response.js +2 -0
- package/cjs/app/ai/mcp/internal/stdio-process.js +1 -0
- package/cjs/app/ai/mcp/mcp-registry.service.js +2 -0
- package/cjs/app/ai/mcp/mcp.client.js +3 -0
- package/cjs/app/ai/mcp/mcp.loader.js +1 -0
- package/cjs/app/ai/mcp/mcp.module.js +1 -0
- package/cjs/app/ai/mcp/mcp.types.js +1 -0
- package/cjs/app/ai/memory/checkpoint.service.js +1 -0
- package/cjs/app/ai/memory/internal/load-memory-config.js +1 -0
- package/cjs/app/ai/memory/memory.module.js +1 -0
- package/cjs/app/ai/memory/thread.service.js +1 -0
- package/cjs/app/ai/models/chat-sse.js +4 -0
- package/cjs/app/ai/models/chat.js +1 -0
- package/cjs/app/ai/models/http.js +1 -0
- package/cjs/app/ai/models/image.js +1 -0
- package/cjs/app/ai/models/video.js +1 -0
- package/cjs/app/ai/nest-service-provider.js +1 -0
- package/cjs/app/ai/rag/chunker.js +2 -0
- package/cjs/app/ai/rag/internal/load-embedding-config.js +1 -0
- package/cjs/app/ai/rag/internal/load-rag-config.js +1 -0
- package/cjs/app/ai/rag/rag.interface.js +1 -0
- package/cjs/app/ai/rag/rag.module.js +1 -0
- package/cjs/app/ai/rag/retriever.service.js +1 -0
- package/cjs/app/ai/retention/conversation-retention.service.js +1 -0
- package/cjs/app/ai/retention/retention-policy.js +1 -0
- package/cjs/app/ai/runtime/ai-runtime-startup.validator.js +1 -0
- package/cjs/app/ai/runtime/ai-runtime.js +1 -0
- package/cjs/app/ai/runtime/internal/agent-run-context.js +1 -0
- package/cjs/app/ai/runtime/internal/compact-tool-result.js +1 -0
- package/cjs/app/ai/runtime/internal/context-compaction.service.js +4 -0
- package/cjs/app/ai/runtime/internal/declaration-snapshot.js +1 -0
- package/cjs/app/ai/runtime/internal/load-llm-config.js +1 -0
- package/cjs/app/ai/runtime/internal/load-runtime-config.js +1 -0
- package/cjs/app/ai/runtime/internal/owned-runtime-resources.js +1 -0
- package/cjs/app/ai/runtime/internal/request-budget.js +1 -0
- package/cjs/app/ai/runtime/internal/run-event-queue.js +1 -0
- package/cjs/app/ai/runtime/langchain/langchain-planner.service.js +1 -0
- package/cjs/app/ai/runtime/langchain/skill-tool.adapter.js +1 -0
- package/cjs/app/ai/runtime/langgraph/agent.graph.js +1 -0
- package/cjs/app/ai/runtime/langgraph/agent.state.js +1 -0
- package/cjs/app/ai/runtime/langgraph/langgraph-orchestrator.service.js +1 -0
- package/cjs/app/ai/runtime/runtime.module.js +1 -0
- package/cjs/app/ai/runtime/thread-execution-coordinator.js +1 -0
- package/cjs/app/ai/skill/skill-scanner.service.js +1 -0
- package/cjs/app/ai/skill/skill.module.js +1 -0
- package/cjs/app/ai/snapshot-data.js +1 -0
- package/cjs/app/ai/store/internal/archive-id.js +1 -0
- package/cjs/app/ai/store/internal/create-vector-store.js +1 -0
- package/cjs/app/ai/store/internal/load-store-config.js +1 -0
- package/cjs/app/ai/store/internal/load-thread-state-store.js +1 -0
- package/cjs/app/ai/store/reference/file-memory.store.js +1 -0
- package/cjs/app/ai/store/reference/file-trace.store.js +1 -0
- package/cjs/app/ai/store/reference/file-vector.store.js +1 -0
- package/cjs/app/ai/store/reference/qdrant-vector.store.js +1 -0
- package/cjs/app/ai/store/store.interface.js +1 -0
- package/cjs/app/ai/store/store.module.js +1 -0
- package/cjs/app/ai/tool/builtin/index.js +1 -0
- package/cjs/app/ai/tool/builtin/invoke-agent.tool.js +1 -0
- package/cjs/app/ai/tool/builtin/retrieve.tool.js +1 -0
- package/cjs/app/ai/tool/executor.service.js +1 -0
- package/cjs/app/ai/tool/tool-registry.service.js +1 -0
- package/cjs/app/ai/tool/tool.module.js +1 -0
- package/cjs/app/ai/trace/trace.service.js +1 -0
- package/cjs/app/csr/controller.js +1 -0
- package/cjs/app/extends/$fetch.js +1 -1
- package/cjs/app/extends/crypto.js +1 -1
- package/cjs/app/extends/db.js +4 -4
- package/cjs/app/extends/logger.js +1 -1
- package/cjs/app/frontend-development.js +1 -0
- package/cjs/app/html/browser-options.js +1 -0
- package/cjs/app/html/shell.js +31 -16
- package/cjs/app/http/api-signing.js +1 -0
- package/cjs/app/http/body-parser.middleware.js +1 -0
- package/cjs/app/http/compression.middleware.js +1 -0
- package/cjs/app/http/context.js +1 -0
- package/cjs/app/http/controller.js +1 -0
- package/cjs/app/http/csp-nonce.js +1 -0
- package/cjs/app/http/error-response.js +1 -0
- package/cjs/app/http/errors.js +1 -0
- package/cjs/app/http/exception-filter.js +1 -0
- package/cjs/app/http/request-body-parser-policy.js +1 -0
- package/cjs/app/http/request-data.js +1 -0
- package/cjs/app/http/request-schema.pipe.js +1 -0
- package/cjs/app/http/response.interceptor.js +1 -0
- package/cjs/app/http/response.js +1 -0
- package/cjs/app/http/security.guard.js +1 -0
- package/cjs/app/project/controller.js +1 -0
- package/cjs/app/project/service.js +1 -0
- package/cjs/app/providers/csr.js +1 -0
- package/cjs/app/providers/foundation.js +1 -0
- package/cjs/app/ssr/artifacts.js +1 -0
- package/cjs/app/ssr/controller.js +1 -0
- package/cjs/app/ssr/html.js +19 -11
- package/cjs/app/ssr/manifest.js +2 -2
- package/cjs/app/ssr/session.js +1 -0
- package/cjs/app/ssr/stream.js +1 -0
- package/cjs/app/ssr/streaming-request-cache.js +1 -0
- package/cjs/app/static-assets.middleware.js +1 -0
- package/cjs/app/template-core.module.js +1 -0
- package/cjs/app/view/entry.tpl +2 -2
- package/cjs/bundler/buildBE.js +1 -1
- package/cjs/bundler/buildFE.js +1 -1
- package/cjs/bundler/buildSSR.js +1 -1
- package/cjs/bundler/dev-session.js +1 -0
- package/cjs/bundler/dev.js +1 -1
- package/cjs/bundler/entryCollect.js +1 -1
- package/cjs/bundler/feSharedConfig.js +1 -1
- package/cjs/bundler/index.js +1 -1
- package/cjs/bundler/prod.js +1 -1
- package/cjs/bundler/ssrClientManifest.js +1 -1
- package/cjs/bundler/ssrEntries.js +1 -1
- package/cjs/bundler/state.js +1 -1
- package/cjs/bundler/utils.js +3 -3
- package/cjs/config/config.default.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/package.json +1 -0
- package/cjs/packages/common/index.js +1 -1
- package/cjs/packages/core/bootstrap.js +1 -0
- package/cjs/packages/core/config-service.js +1 -0
- package/cjs/packages/core/duplicate-route-checking-adapter.js +1 -0
- package/cjs/packages/core/index.js +1 -1
- package/cjs/packages/core/legacy-factory-diagnostics.js +1 -0
- package/cjs/packages/core/loader/model.js +1 -1
- package/cjs/packages/core/paths.js +1 -1
- package/cjs/packages/core/resource-lifecycle.js +1 -0
- package/cjs/packages/core/startup.js +1 -0
- package/cjs/packages/core/tokens.js +1 -0
- package/cjs/packages/utils/runFileFn.js +1 -1
- package/cjs/scripts/vite-build/build.js +2 -1
- package/esm/app/ai/agent/agent-scanner.service.js +88 -0
- package/esm/app/ai/agent/agent.interface.js +0 -0
- package/esm/app/ai/agent/agent.module.js +13 -0
- package/esm/app/ai/ai-config.module.js +24 -0
- package/esm/app/ai/ai-config.service.js +42 -0
- package/esm/app/ai/ai.controller.js +162 -0
- package/esm/app/ai/ai.module.js +48 -0
- package/esm/app/ai/contracts/index.js +0 -0
- package/esm/app/ai/declaration-paths.js +28 -0
- package/esm/app/ai/eval/assertions.js +49 -0
- package/esm/app/ai/guardrail/guardrail.interface.js +0 -0
- package/esm/app/ai/guardrail/guardrail.module.js +13 -0
- package/esm/app/ai/guardrail/guardrail.service.js +30 -0
- package/esm/app/ai/guardrail/internal/load-guardrail-config.js +17 -0
- package/esm/app/ai/index.js +2 -0
- package/esm/app/ai/mcp/internal/load-mcp-config.js +50 -0
- package/esm/app/ai/mcp/internal/read-sse-response.js +35 -0
- package/esm/app/ai/mcp/internal/stdio-process.js +59 -0
- package/esm/app/ai/mcp/mcp-registry.service.js +20 -0
- package/esm/app/ai/mcp/mcp.client.js +198 -0
- package/esm/app/ai/mcp/mcp.loader.js +85 -0
- package/esm/app/ai/mcp/mcp.module.js +70 -0
- package/esm/app/ai/mcp/mcp.types.js +4 -0
- package/esm/app/ai/memory/checkpoint.service.js +79 -0
- package/esm/app/ai/memory/internal/load-memory-config.js +15 -0
- package/esm/app/ai/memory/memory.module.js +17 -0
- package/esm/app/ai/memory/thread.service.js +75 -0
- package/esm/app/ai/models/chat-sse.js +44 -0
- package/esm/app/ai/models/chat.js +60 -0
- package/esm/app/ai/models/http.js +52 -0
- package/esm/app/ai/models/image.js +37 -0
- package/esm/app/ai/models/video.js +32 -0
- package/esm/app/ai/nest-service-provider.js +10 -0
- package/esm/app/ai/rag/chunker.js +23 -0
- package/esm/app/ai/rag/internal/load-embedding-config.js +44 -0
- package/esm/app/ai/rag/internal/load-rag-config.js +35 -0
- package/esm/app/ai/rag/rag.interface.js +4 -0
- package/esm/app/ai/rag/rag.module.js +30 -0
- package/esm/app/ai/rag/retriever.service.js +62 -0
- package/esm/app/ai/retention/conversation-retention.service.js +48 -0
- package/esm/app/ai/retention/retention-policy.js +14 -0
- package/esm/app/ai/runtime/ai-runtime-startup.validator.js +15 -0
- package/esm/app/ai/runtime/ai-runtime.js +104 -0
- package/esm/app/ai/runtime/internal/agent-run-context.js +5 -0
- package/esm/app/ai/runtime/internal/compact-tool-result.js +94 -0
- package/esm/app/ai/runtime/internal/context-compaction.service.js +346 -0
- package/esm/app/ai/runtime/internal/declaration-snapshot.js +32 -0
- package/esm/app/ai/runtime/internal/load-llm-config.js +52 -0
- package/esm/app/ai/runtime/internal/load-runtime-config.js +12 -0
- package/esm/app/ai/runtime/internal/owned-runtime-resources.js +21 -0
- package/esm/app/ai/runtime/internal/request-budget.js +152 -0
- package/esm/app/ai/runtime/internal/run-event-queue.js +23 -0
- package/esm/app/ai/runtime/langchain/langchain-planner.service.js +189 -0
- package/esm/app/ai/runtime/langchain/skill-tool.adapter.js +29 -0
- package/esm/app/ai/runtime/langgraph/agent.graph.js +157 -0
- package/esm/app/ai/runtime/langgraph/agent.state.js +37 -0
- package/esm/app/ai/runtime/langgraph/langgraph-orchestrator.service.js +404 -0
- package/esm/app/ai/runtime/runtime.module.js +65 -0
- package/esm/app/ai/runtime/thread-execution-coordinator.js +27 -0
- package/esm/app/ai/skill/skill-scanner.service.js +66 -0
- package/esm/app/ai/skill/skill.interface.js +0 -0
- package/esm/app/ai/skill/skill.module.js +13 -0
- package/esm/app/ai/snapshot-data.js +24 -0
- package/esm/app/ai/store/internal/archive-id.js +11 -0
- package/esm/app/ai/store/internal/create-vector-store.js +10 -0
- package/esm/app/ai/store/internal/load-store-config.js +27 -0
- package/esm/app/ai/store/internal/load-thread-state-store.js +17 -0
- package/esm/app/ai/store/reference/file-memory.store.js +279 -0
- package/esm/app/ai/store/reference/file-trace.store.js +44 -0
- package/esm/app/ai/store/reference/file-vector.store.js +41 -0
- package/esm/app/ai/store/reference/qdrant-vector.store.js +65 -0
- package/esm/app/ai/store/store.interface.js +4 -0
- package/esm/app/ai/store/store.module.js +36 -0
- package/esm/app/ai/tool/builtin/index.js +18 -0
- package/esm/app/ai/tool/builtin/invoke-agent.tool.js +82 -0
- package/esm/app/ai/tool/builtin/retrieve.tool.js +27 -0
- package/esm/app/ai/tool/executor.service.js +71 -0
- package/esm/app/ai/tool/tool-registry.service.js +23 -0
- package/esm/app/ai/tool/tool.interface.js +0 -0
- package/esm/app/ai/tool/tool.module.js +28 -0
- package/esm/app/ai/trace/trace.service.js +80 -0
- package/esm/app/csr/controller.js +187 -0
- package/esm/app/csr/types.js +0 -0
- package/esm/app/extends/$fetch.js +6 -6
- package/esm/app/extends/crypto.js +4 -3
- package/esm/app/extends/db.js +65 -65
- package/esm/app/extends/logger.js +73 -12
- package/esm/app/frontend-development.js +24 -0
- package/esm/app/html/browser-options.js +7 -0
- package/esm/app/html/shell.js +173 -32
- package/esm/app/http/api-signing.js +13 -0
- package/esm/app/http/body-parser.middleware.js +73 -0
- package/esm/app/http/compression.middleware.js +13 -0
- package/esm/app/http/context.js +21 -0
- package/esm/app/http/controller.js +9 -0
- package/esm/app/http/csp-nonce.js +13 -0
- package/esm/app/http/error-response.js +39 -0
- package/esm/app/http/errors.js +24 -0
- package/esm/app/http/exception-filter.js +52 -0
- package/esm/app/http/request-body-parser-policy.js +46 -0
- package/esm/app/http/request-data.js +17 -0
- package/esm/app/http/request-schema.pipe.js +40 -0
- package/esm/app/http/response.interceptor.js +26 -0
- package/esm/app/http/response.js +23 -0
- package/esm/app/http/security.guard.js +53 -0
- package/esm/app/project/controller.js +81 -0
- package/esm/app/project/service.js +35 -0
- package/esm/app/providers/csr.js +65 -0
- package/esm/app/providers/foundation.js +158 -0
- package/esm/app/ssr/artifacts.js +70 -0
- package/esm/app/ssr/controller.js +193 -0
- package/esm/app/ssr/html.js +67 -53
- package/esm/app/ssr/manifest.js +24 -10
- package/esm/app/ssr/session.js +91 -0
- package/esm/app/ssr/stream.js +51 -0
- package/esm/app/ssr/streaming-request-cache.js +30 -0
- package/esm/app/ssr/types.js +0 -0
- package/esm/app/static-assets.middleware.js +68 -0
- package/esm/app/template-core.module.js +97 -0
- package/esm/app/view/entry.tpl +2 -2
- package/esm/bundler/buildBE.js +1 -0
- package/esm/bundler/buildFE.js +11 -11
- package/esm/bundler/buildSSR.js +61 -63
- package/esm/bundler/dev-session.js +145 -0
- package/esm/bundler/dev.js +8 -9
- package/esm/bundler/entryCollect.js +9 -9
- package/esm/bundler/feSharedConfig.js +41 -11
- package/esm/bundler/index.js +2 -1
- package/esm/bundler/prod.js +7 -11
- package/esm/bundler/ssrClientManifest.js +5 -5
- package/esm/bundler/ssrEntries.js +5 -5
- package/esm/bundler/state.js +5 -7
- package/esm/bundler/utils.js +171 -161
- package/esm/config/config.default.js +4 -3
- package/esm/index.js +29 -12
- package/esm/package.json +1 -0
- package/esm/packages/common/index.js +5 -5
- package/esm/packages/core/bootstrap.js +82 -0
- package/esm/packages/core/config-service.js +46 -0
- package/esm/packages/core/duplicate-route-checking-adapter.js +106 -0
- package/esm/packages/core/index.js +7 -60
- package/esm/packages/core/legacy-factory-diagnostics.js +74 -0
- package/esm/packages/core/loader/model.js +6 -1
- package/esm/packages/core/paths.js +5 -11
- package/esm/packages/core/resource-lifecycle.js +83 -0
- package/esm/packages/core/startup.js +256 -0
- package/esm/packages/core/tokens.js +4 -0
- package/esm/packages/utils/runFileFn.js +19 -35
- package/esm/scripts/vite-build/build.js +29 -22
- package/fe/frontend/apps/dash/Dashboard.js +3 -3
- package/fe/frontend/apps/ui-components/UiComponentsPreview.d.ts +2 -0
- package/fe/frontend/apps/ui-components/UiComponentsPreview.js +182 -0
- package/fe/frontend/apps/ui-components/index.d.ts +1 -2
- package/fe/frontend/apps/ui-components/index.js +2 -8
- package/fe/frontend/apps/ui-components/ui-components.entry.js +3 -2
- package/fe/frontend/src/common/fetchErrorShow.js +1 -1
- package/fe/frontend/src/common/importComponent.js +1 -1
- package/fe/frontend/src/common/language.d.ts +1 -1
- package/fe/frontend/src/common/language.js +2 -2
- package/fe/frontend/src/common/request.d.ts +2 -0
- package/fe/frontend/src/common/request.js +19 -5
- package/fe/frontend/src/common/schemaForm.js +2 -2
- package/fe/frontend/src/components/AsyncSelect/AsyncSelect.d.ts +1 -1
- package/fe/frontend/src/components/AsyncSelect/AsyncSelect.js +3 -3
- package/fe/frontend/src/components/BasePage/HeaderView.js +1 -2
- package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.d.ts +1 -1
- package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.js +7 -7
- package/fe/frontend/src/components/ThemeSwitch/ThemeSwitch.js +14 -8
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.js +3 -3
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.js +4 -4
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaSearch/index.js +2 -2
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/PreviewImage.d.ts +1 -1
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/PreviewImage.js +1 -1
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/index.js +7 -7
- package/fe/frontend/src/defaultPages/SchemaPage/index.js +2 -2
- package/fe/frontend/src/defaultPages/SidebarSlotPage/SidebarSlotContainer.js +2 -2
- package/fe/frontend/src/hooks/useRouterParams.d.ts +4 -2
- package/fe/frontend/src/hooks/useText.d.ts +1 -1
- package/fe/frontend/src/hooks/useText.js +2 -2
- package/fe/frontend/src/index.d.ts +4 -4
- package/fe/frontend/src/index.js +4 -4
- package/fe/frontend/src/language/resources.d.ts +1 -1
- package/fe/frontend/src/main.css +1 -1
- package/fe/frontend/src/stores/apiFreezer.d.ts +1 -1
- package/fe/frontend/src/stores/apiFreezer.js +2 -2
- package/fe/frontend/src/stores/mode.js +1 -2
- package/fe/frontend/src/stores/schemaStore.d.ts +2 -2
- package/fe/frontend/src/stores/schemaStore.js +1 -2
- package/fe/frontend/src/typing/scalability.d.ts +2 -2
- package/fe/models/types/data/button.d.ts +1 -1
- package/fe/models/types/data/component.d.ts +1 -1
- package/fe/models/types/data/schema.d.ts +1 -1
- package/fe/models/types/data/search.d.ts +1 -1
- package/fe/packages/common/index.js +4 -4
- package/fe/packages/common/ssr/hydration.d.ts +9 -0
- package/fe/packages/react/core/Button/Button.js +88 -0
- package/fe/packages/react/core/Button/SubmitButton.d.ts +8 -0
- package/fe/packages/react/core/Button/SubmitButton.js +31 -0
- package/fe/packages/react/core/Button/index.js +3 -0
- package/fe/packages/react/core/Card/Card.js +31 -0
- package/fe/packages/react/core/Card/index.js +2 -0
- package/fe/packages/react/core/Checkbox/Checkbox.js +52 -0
- package/fe/packages/react/core/Checkbox/index.js +2 -0
- package/fe/packages/react/core/Label/Label.d.ts +22 -0
- package/fe/packages/react/core/Label/Label.js +60 -0
- package/fe/packages/react/core/Label/index.js +2 -0
- package/fe/packages/react/core/Layout/Layout.js +33 -0
- package/fe/packages/react/core/Layout/index.js +2 -0
- package/fe/packages/react/core/Loading/Loading.js +48 -0
- package/fe/packages/react/core/Loading/index.js +2 -0
- package/fe/packages/react/core/Skeleton/Skeleton.js +101 -0
- package/fe/packages/react/core/Skeleton/index.js +2 -0
- package/fe/packages/react/core/breadcrumb/breadcrumb.js +155 -0
- package/fe/packages/react/core/breadcrumb/index.js +2 -0
- package/fe/packages/react/core/hooks/index.d.ts +12 -0
- package/fe/packages/react/core/hooks/index.js +13 -0
- package/fe/packages/react/core/hooks/useBreadcrumb.d.ts +9 -0
- package/fe/packages/react/core/hooks/useBreadcrumb.js +5 -0
- package/fe/packages/react/core/hooks/useDropdownPositioning.js +122 -0
- package/fe/packages/react/core/hooks/useExecuteOnce.js +47 -0
- package/fe/packages/react/core/hooks/useHydrationData.d.ts +2 -0
- package/fe/packages/react/core/hooks/useHydrationData.js +23 -0
- package/fe/packages/react/core/hooks/useInit.js +11 -0
- package/fe/packages/react/core/hooks/useInputController.js +39 -0
- package/fe/packages/react/core/hooks/useLanguage.d.ts +1 -0
- package/fe/packages/react/core/hooks/useLanguage.js +8 -0
- package/fe/packages/react/core/hooks/usePagination.js +30 -0
- package/fe/packages/react/core/hooks/useRefState.js +45 -0
- package/fe/packages/react/core/hooks/useSSR.js +46 -0
- package/fe/packages/react/core/hooks/useTableState.d.ts +22 -0
- package/fe/packages/react/core/hooks/useTableState.js +22 -0
- package/fe/packages/react/core/hooks/useWatch.js +60 -0
- package/fe/packages/react/core/index.d.ts +12 -0
- package/fe/packages/react/core/index.js +37 -0
- package/fe/packages/react/core/internal/hydration.d.ts +12 -0
- package/fe/packages/react/core/internal/hydration.js +17 -0
- package/fe/packages/react/core/internal/i18n/default.d.ts +99 -0
- package/fe/packages/react/core/internal/i18n/default.js +111 -0
- package/fe/packages/react/core/internal/i18n/en-US.d.ts +99 -0
- package/fe/packages/react/core/internal/i18n/en-US.js +111 -0
- package/fe/packages/react/core/internal/i18n/index.d.ts +18 -0
- package/fe/packages/react/core/internal/i18n/index.js +179 -0
- package/fe/packages/react/core/internal/i18n/locales.d.ts +7 -0
- package/fe/packages/react/core/internal/i18n/locales.js +18 -0
- package/fe/packages/react/core/internal/i18n/types.d.ts +47 -0
- package/fe/packages/react/core/internal/i18n/types.js +0 -0
- package/fe/packages/react/core/internal/raf-timeout.d.ts +2 -0
- package/fe/packages/react/core/internal/raf-timeout.js +54 -0
- package/fe/packages/react/core/internal/react19-compat.d.ts +15 -0
- package/fe/packages/react/core/internal/react19-compat.js +0 -0
- package/fe/packages/react/core/lib/createStoreHook.js +9 -0
- package/fe/packages/react/core/lib/dataTableWidth.js +33 -0
- package/fe/packages/react/core/lib/export.d.ts +21 -0
- package/fe/packages/react/core/lib/export.js +112 -0
- package/fe/packages/react/core/lib/index.d.ts +4 -0
- package/fe/packages/react/core/lib/index.js +5 -0
- package/fe/packages/react/core/lib/utils.d.ts +10 -0
- package/fe/packages/react/core/lib/utils.js +64 -0
- package/fe/packages/react/core/stores/breadcrumb.d.ts +14 -0
- package/fe/packages/react/core/stores/breadcrumb.js +52 -0
- package/fe/packages/react/core/stores/index.d.ts +2 -0
- package/fe/packages/react/core/stores/index.js +5 -0
- package/fe/packages/react/core/stores/language.d.ts +3 -0
- package/fe/packages/react/core/stores/language.js +3 -0
- package/fe/packages/react/core/types/baseType.js +0 -0
- package/fe/packages/react/core/types/index.js +0 -0
- package/fe/packages/react/dev/preview/DemoSection.d.ts +12 -0
- package/fe/packages/react/dev/preview/demoRegistry.d.ts +8 -0
- package/fe/packages/react/dev/preview/demos/core/ButtonDemo.d.ts +3 -0
- package/fe/packages/react/dev/preview/demos/forms/InputDemo.d.ts +3 -0
- package/fe/packages/react/dev/preview/demos/overlays/ModalDemo.d.ts +3 -0
- package/fe/packages/react/dev/preview/index.d.ts +2 -0
- package/fe/packages/react/forms/DataTable/ActionBtn.d.ts +7 -0
- package/fe/packages/react/forms/DataTable/ActionBtn.js +116 -0
- package/fe/packages/react/forms/DataTable/index.d.ts +34 -0
- package/fe/packages/react/forms/DataTable/index.js +230 -0
- package/fe/packages/react/forms/Date/Calendar.js +351 -0
- package/fe/packages/react/forms/Date/Date.js +210 -0
- package/fe/packages/react/forms/Date/LocaleContext.js +27 -0
- package/fe/packages/react/forms/Date/LocaleProvider.js +22 -0
- package/fe/packages/react/forms/Date/TimePicker.js +136 -0
- package/fe/packages/react/forms/Date/data.js +7 -0
- package/fe/packages/react/forms/Date/dateLocaleStore.js +14 -0
- package/fe/packages/react/forms/Date/dropdownPositioning.d.ts +2 -0
- package/fe/packages/react/forms/Date/dropdownPositioning.js +12 -0
- package/fe/packages/react/forms/Date/index.js +6 -0
- package/fe/packages/react/forms/Date/locales.d.ts +30 -0
- package/fe/packages/react/forms/Date/locales.js +58 -0
- package/fe/packages/react/forms/Form/Form.js +15 -0
- package/fe/packages/react/forms/Form/FormItem.d.ts +19 -0
- package/fe/packages/react/forms/Form/FormItem.js +87 -0
- package/fe/packages/react/forms/Form/SchemaForm/data.d.ts +40 -0
- package/fe/packages/react/forms/Form/SchemaForm/data.js +15 -0
- package/fe/packages/react/forms/Form/SchemaForm/defaultComponentsMap.js +4 -0
- package/fe/packages/react/forms/Form/SchemaForm/index.d.ts +60 -0
- package/fe/packages/react/forms/Form/SchemaForm/index.js +119 -0
- package/fe/packages/react/forms/Form/index.d.ts +5 -0
- package/fe/packages/react/forms/Form/index.js +6 -0
- package/fe/packages/react/forms/Input/Input.js +146 -0
- package/fe/packages/react/forms/Input/index.js +2 -0
- package/fe/packages/react/forms/InputNumber/InputNumber.d.ts +25 -0
- package/fe/packages/react/forms/InputNumber/InputNumber.js +207 -0
- package/fe/packages/react/forms/InputNumber/index.js +2 -0
- package/fe/packages/react/forms/InputNumber/inputNumberUtils.js +45 -0
- package/fe/packages/react/forms/MultiSelect/MultiSelect.d.ts +26 -0
- package/fe/packages/react/forms/MultiSelect/MultiSelect.js +218 -0
- package/fe/packages/react/forms/MultiSelect/index.d.ts +1 -0
- package/fe/packages/react/forms/MultiSelect/index.js +2 -0
- package/fe/packages/react/forms/Pagination/Pagination.d.ts +15 -0
- package/fe/packages/react/forms/Pagination/Pagination.js +124 -0
- package/fe/packages/react/forms/Pagination/index.js +2 -0
- package/fe/packages/react/forms/Radio/Radio.js +36 -0
- package/fe/packages/react/forms/Radio/RadioGroup.js +33 -0
- package/fe/packages/react/forms/Radio/index.js +3 -0
- package/fe/packages/react/forms/Search/Search.d.ts +13 -0
- package/fe/packages/react/forms/Search/Search.js +24 -0
- package/fe/packages/react/forms/Search/index.js +2 -0
- package/fe/packages/react/forms/Select/Select.d.ts +32 -0
- package/fe/packages/react/forms/Select/Select.js +295 -0
- package/fe/packages/react/forms/Select/dropdownPositioning.d.ts +2 -0
- package/fe/packages/react/forms/Select/dropdownPositioning.js +16 -0
- package/fe/packages/react/forms/Select/index.js +2 -0
- package/fe/packages/react/forms/Switch/Switch.js +28 -0
- package/fe/packages/react/forms/Switch/index.js +2 -0
- package/fe/packages/react/forms/TableSearch/TableSearch.d.ts +30 -0
- package/fe/packages/react/forms/TableSearch/TableSearch.js +154 -0
- package/fe/packages/react/forms/TableSearch/index.js +2 -0
- package/fe/packages/react/forms/TableSearch/lang.d.ts +16 -0
- package/fe/packages/react/forms/TableSearch/lang.js +25 -0
- package/fe/packages/react/forms/TableSearch/tableSearchLocaleStore.js +10 -0
- package/fe/packages/react/forms/Textarea/Textarea.js +58 -0
- package/fe/packages/react/forms/Textarea/index.js +2 -0
- package/fe/packages/react/forms/TreeSelect/TreeSelect.js +190 -0
- package/fe/packages/react/forms/TreeSelect/index.js +2 -0
- package/fe/packages/react/forms/Upload/ImageUpload.js +101 -0
- package/fe/packages/react/forms/Upload/Upload.js +29 -0
- package/fe/packages/react/forms/Upload/index.js +3 -0
- package/fe/packages/react/forms/index.d.ts +16 -0
- package/fe/packages/react/forms/index.js +43 -0
- package/fe/packages/react/forms/table/index.js +2 -0
- package/fe/packages/react/forms/table/table.js +166 -0
- package/fe/packages/react/i18n/I18nContext.d.ts +6 -0
- package/fe/packages/react/i18n/I18nContext.js +5 -0
- package/fe/packages/react/i18n/I18nProvider.d.ts +6 -0
- package/fe/packages/react/i18n/I18nProvider.js +19 -0
- package/fe/packages/react/i18n/getUiReactLocale.d.ts +202 -0
- package/fe/packages/react/i18n/getUiReactLocale.js +13 -0
- package/fe/packages/react/i18n/index.d.ts +5 -0
- package/fe/packages/react/i18n/index.js +7 -0
- package/fe/packages/react/i18n/legacy.d.ts +9 -0
- package/fe/packages/react/i18n/legacy.js +12 -0
- package/fe/packages/react/i18n/locales/en-US.d.ts +1 -0
- package/fe/packages/react/i18n/locales/en-US.js +2 -0
- package/fe/packages/react/i18n/locales/zh-CN.d.ts +1 -0
- package/fe/packages/react/i18n/locales/zh-CN.js +2 -0
- package/fe/packages/react/i18n/useI18n.d.ts +2 -0
- package/fe/packages/react/i18n/useI18n.js +15 -0
- package/fe/packages/react/i18n/useI18nState.d.ts +3 -0
- package/fe/packages/react/i18n/useI18nState.js +24 -0
- package/fe/packages/react/index.d.ts +6 -0
- package/fe/packages/react/index.js +81 -0
- package/fe/packages/react/overlays/Dialog/ConfirmDialog.js +41 -0
- package/fe/packages/react/overlays/Dialog/index.js +2 -0
- package/fe/packages/react/overlays/Drawer/Drawer.d.ts +23 -0
- package/fe/packages/react/overlays/Drawer/Drawer.js +165 -0
- package/fe/packages/react/overlays/Drawer/index.js +2 -0
- package/fe/packages/react/overlays/Dropdown/Dropdown.d.ts +34 -0
- package/fe/packages/react/overlays/Dropdown/Dropdown.js +118 -0
- package/fe/packages/react/overlays/Dropdown/index.js +2 -0
- package/fe/packages/react/overlays/DropdownMenu/Menu.js +147 -0
- package/fe/packages/react/overlays/DropdownMenu/MenuContext.js +88 -0
- package/fe/packages/react/overlays/DropdownMenu/MenuItem.js +78 -0
- package/fe/packages/react/overlays/DropdownMenu/SubMenu.js +207 -0
- package/fe/packages/react/overlays/DropdownMenu/index.js +5 -0
- package/fe/packages/react/overlays/DropdownMenu/menuTypes.js +0 -0
- package/fe/packages/react/overlays/DropdownMenu/utils.js +8 -0
- package/fe/packages/react/overlays/Message/Message.js +76 -0
- package/fe/packages/react/overlays/Message/MessageManager.js +104 -0
- package/fe/packages/react/overlays/Message/data.js +4 -0
- package/fe/packages/react/overlays/Message/index.js +2 -0
- package/fe/packages/react/overlays/Modal/Modal.d.ts +28 -0
- package/fe/packages/react/overlays/Modal/Modal.js +83 -0
- package/fe/packages/react/overlays/Modal/ModalManager.d.ts +47 -0
- package/fe/packages/react/overlays/Modal/ModalManager.js +116 -0
- package/fe/packages/react/overlays/Modal/index.d.ts +4 -0
- package/fe/packages/react/overlays/Modal/index.js +3 -0
- package/fe/packages/react/overlays/Overlay/Overlay.d.ts +23 -0
- package/fe/packages/react/overlays/Overlay/Overlay.js +78 -0
- package/fe/packages/react/overlays/Overlay/focusTypes.d.ts +8 -0
- package/fe/packages/react/overlays/Overlay/focusTypes.js +0 -0
- package/fe/packages/react/overlays/Overlay/index.d.ts +3 -0
- package/fe/packages/react/overlays/Overlay/index.js +2 -0
- package/fe/packages/react/overlays/Overlay/overlayStack.d.ts +16 -0
- package/fe/packages/react/overlays/Overlay/overlayStack.js +290 -0
- package/fe/packages/react/overlays/Popover/Notification.js +56 -0
- package/fe/packages/react/overlays/Popover/index.js +2 -0
- package/fe/packages/react/overlays/Popup/Popup.d.ts +26 -0
- package/fe/packages/react/overlays/Popup/Popup.js +108 -0
- package/fe/packages/react/overlays/Popup/index.js +2 -0
- package/fe/packages/react/overlays/Tooltip/Tooltip.js +88 -0
- package/fe/packages/react/overlays/Tooltip/index.js +2 -0
- package/fe/packages/react/overlays/index.d.ts +10 -0
- package/fe/packages/react/overlays/index.js +25 -0
- package/fe/packages/react/styles.css +299 -0
- package/fe/packages/react/ui/components/Button/index.d.ts +1 -3
- package/fe/packages/react/ui/components/Button/index.js +3 -2
- package/fe/packages/react/ui/components/Card/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Card/index.js +2 -1
- package/fe/packages/react/ui/components/Checkbox/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Checkbox/index.js +2 -1
- package/fe/packages/react/ui/components/ConfirmDialog/index.d.ts +1 -1
- package/fe/packages/react/ui/components/ConfirmDialog/index.js +2 -1
- package/fe/packages/react/ui/components/DataTable/index.d.ts +1 -32
- package/fe/packages/react/ui/components/DataTable/index.js +2 -215
- package/fe/packages/react/ui/components/Date/index.d.ts +1 -5
- package/fe/packages/react/ui/components/Date/index.js +6 -5
- package/fe/packages/react/ui/components/Drawer/index.d.ts +1 -2
- package/fe/packages/react/ui/components/Drawer/index.js +2 -1
- package/fe/packages/react/ui/components/Dropdown/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Dropdown/index.js +2 -1
- package/fe/packages/react/ui/components/Form/index.d.ts +1 -4
- package/fe/packages/react/ui/components/Form/index.js +6 -5
- package/fe/packages/react/ui/components/ImagePreview/ImagePreview.js +9 -5
- package/fe/packages/react/ui/components/ImagePreview/PreviewImage.d.ts +1 -1
- package/fe/packages/react/ui/components/ImagePreview/PreviewImage.js +4 -4
- package/fe/packages/react/ui/components/Input/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Input/index.js +2 -1
- package/fe/packages/react/ui/components/InputNumber/index.d.ts +1 -1
- package/fe/packages/react/ui/components/InputNumber/index.js +2 -1
- package/fe/packages/react/ui/components/Label/index.d.ts +1 -2
- package/fe/packages/react/ui/components/Label/index.js +3 -2
- package/fe/packages/react/ui/components/Layout/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Layout/index.js +2 -1
- package/fe/packages/react/ui/components/Loading/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Loading/index.js +2 -1
- package/fe/packages/react/ui/components/Menu/index.d.ts +1 -8
- package/fe/packages/react/ui/components/Menu/index.js +5 -4
- package/fe/packages/react/ui/components/Message/index.d.ts +1 -2
- package/fe/packages/react/ui/components/Message/index.js +2 -1
- package/fe/packages/react/ui/components/Modal/index.d.ts +1 -3
- package/fe/packages/react/ui/components/Modal/index.js +3 -2
- package/fe/packages/react/ui/components/Notification/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Notification/index.js +2 -1
- package/fe/packages/react/ui/components/Overlay/Overlay.js +1 -1
- package/fe/packages/react/ui/components/Overlay/index.d.ts +1 -2
- package/fe/packages/react/ui/components/Overlay/index.js +2 -1
- package/fe/packages/react/ui/components/Pagination/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Pagination/index.js +2 -1
- package/fe/packages/react/ui/components/Popup/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Popup/index.js +2 -1
- package/fe/packages/react/ui/components/Radio/index.d.ts +1 -2
- package/fe/packages/react/ui/components/Radio/index.js +3 -2
- package/fe/packages/react/ui/components/Search/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Search/index.js +2 -1
- package/fe/packages/react/ui/components/Select/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Select/index.js +2 -1
- package/fe/packages/react/ui/components/Skeleton/index.d.ts +1 -2
- package/fe/packages/react/ui/components/Skeleton/index.js +2 -1
- package/fe/packages/react/ui/components/Switch/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Switch/index.js +2 -1
- package/fe/packages/react/ui/components/TableSearch/index.d.ts +1 -2
- package/fe/packages/react/ui/components/TableSearch/index.js +2 -1
- package/fe/packages/react/ui/components/Tabs/Tabs.js +1 -1
- package/fe/packages/react/ui/components/Textarea/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Textarea/index.js +2 -1
- package/fe/packages/react/ui/components/Tooltip/index.d.ts +1 -1
- package/fe/packages/react/ui/components/Tooltip/index.js +2 -1
- package/fe/packages/react/ui/components/TreeSelect/index.d.ts +1 -1
- package/fe/packages/react/ui/components/TreeSelect/index.js +2 -1
- package/fe/packages/react/ui/components/Upload/index.d.ts +1 -2
- package/fe/packages/react/ui/components/Upload/index.js +3 -2
- package/fe/packages/react/ui/components/breadcrumb/index.d.ts +1 -1
- package/fe/packages/react/ui/components/breadcrumb/index.js +2 -1
- package/fe/packages/react/ui/components/index.d.ts +3 -33
- package/fe/packages/react/ui/components/index.js +70 -77
- package/fe/packages/react/ui/components/table/index.d.ts +1 -1
- package/fe/packages/react/ui/components/table/index.js +2 -1
- package/fe/packages/react/ui/i18n/I18nProvider.d.ts +1 -1
- package/fe/packages/react/ui/i18n/I18nProvider.js +2 -1
- package/fe/packages/react/ui/i18n/index.d.ts +1 -3
- package/fe/packages/react/ui/i18n/index.js +8 -7
- package/fe/packages/react/ui/i18n/useI18n.d.ts +6 -6
- package/fe/packages/react/ui/i18n/useI18n.js +2 -2
- package/fe/packages/react/ui/index.css +2 -299
- package/fe/packages/react/ui/index.d.ts +0 -2
- package/fe/packages/react/ui/index.js +73 -55
- package/fe/ssr/apps/dash/dash.entry.js +7 -3
- package/fe/ssr/apps/ui-components/ui-components.entry.js +3 -2
- package/fe/ssr/components/StreamingRender/StreamingCache.d.ts +1 -0
- package/fe/ssr/components/StreamingRender/StreamingCache.js +11 -1
- package/fe/ssr/components/StreamingRender/StreamingRender.d.ts +1 -1
- package/fe/ssr/components/StreamingRender/StreamingRender.js +29 -23
- package/fe/ssr/components/StreamingRender/StreamingScript.d.ts +3 -0
- package/fe/ssr/components/StreamingRender/StreamingScript.js +47 -1
- package/fe/ssr/createSSREntry.d.ts +9 -3
- package/fe/ssr/createSSREntry.js +43 -19
- package/fe/ssr/index.d.ts +4 -1
- package/fe/ssr/index.js +2 -1
- package/fe/ssr/router.d.ts +76 -0
- package/fe/ssr/router.js +349 -0
- package/fe/ssr/types.d.ts +1 -13
- package/models/frontend/src/common/language.d.ts +1 -1
- package/models/frontend/src/common/request.d.ts +2 -0
- package/models/frontend/src/components/AsyncSelect/AsyncSelect.d.ts +1 -1
- package/models/frontend/src/hooks/useText.d.ts +1 -1
- package/models/frontend/src/language/resources.d.ts +1 -1
- package/models/frontend/src/stores/apiFreezer.d.ts +1 -1
- package/models/frontend/src/stores/schemaStore.d.ts +2 -2
- package/models/frontend/src/typing/scalability.d.ts +2 -2
- package/models/models/types/data/button.d.ts +1 -1
- package/models/models/types/data/component.d.ts +1 -1
- package/models/models/types/data/schema.d.ts +1 -1
- package/models/models/types/data/search.d.ts +1 -1
- package/models/packages/common/ssr/hydration.d.ts +9 -0
- package/models/packages/react/core/Button/SubmitButton.d.ts +8 -0
- package/models/packages/react/core/Button/index.d.ts +3 -0
- package/models/packages/react/core/Card/index.d.ts +1 -0
- package/models/packages/react/core/Checkbox/index.d.ts +1 -0
- package/models/packages/react/core/Label/Label.d.ts +22 -0
- package/models/packages/react/core/Label/index.d.ts +2 -0
- package/models/packages/react/core/Layout/index.d.ts +1 -0
- package/models/packages/react/core/Loading/index.d.ts +1 -0
- package/models/packages/react/core/Skeleton/index.d.ts +2 -0
- package/models/packages/react/core/breadcrumb/index.d.ts +1 -0
- package/models/packages/react/core/hooks/index.d.ts +12 -0
- package/models/packages/react/core/hooks/useBreadcrumb.d.ts +9 -0
- package/models/packages/react/core/hooks/useHydrationData.d.ts +2 -0
- package/models/packages/react/core/hooks/useInit.d.ts +2 -0
- package/models/packages/react/core/hooks/useLanguage.d.ts +1 -0
- package/models/packages/react/core/hooks/usePagination.d.ts +15 -0
- package/models/packages/react/core/hooks/useRefState.d.ts +9 -0
- package/models/packages/react/core/hooks/useSSR.d.ts +6 -0
- package/models/packages/react/core/hooks/useTableState.d.ts +22 -0
- package/models/packages/react/core/hooks/useWatch.d.ts +14 -0
- package/models/packages/react/core/index.d.ts +12 -0
- package/models/packages/react/core/internal/hydration.d.ts +12 -0
- package/models/packages/react/core/internal/i18n/default.d.ts +99 -0
- package/models/packages/react/core/internal/i18n/en-US.d.ts +99 -0
- package/models/packages/react/core/internal/i18n/index.d.ts +18 -0
- package/models/packages/react/core/internal/i18n/locales.d.ts +7 -0
- package/models/packages/react/core/internal/i18n/types.d.ts +47 -0
- package/models/packages/react/core/internal/raf-timeout.d.ts +2 -0
- package/models/packages/react/core/internal/react19-compat.d.ts +15 -0
- package/models/packages/react/core/lib/export.d.ts +21 -0
- package/models/packages/react/core/lib/index.d.ts +4 -0
- package/models/packages/react/core/lib/utils.d.ts +10 -0
- package/models/packages/react/core/stores/breadcrumb.d.ts +14 -0
- package/models/packages/react/core/stores/index.d.ts +2 -0
- package/models/packages/react/core/stores/language.d.ts +3 -0
- package/models/packages/react/core/types/baseType.d.ts +21 -0
- package/models/packages/react/forms/DataTable/ActionBtn.d.ts +7 -0
- package/models/packages/react/forms/DataTable/index.d.ts +34 -0
- package/models/packages/react/forms/Date/dropdownPositioning.d.ts +2 -0
- package/models/packages/react/forms/Date/index.d.ts +5 -0
- package/models/packages/react/forms/Date/locales.d.ts +30 -0
- package/models/packages/react/forms/Form/FormItem.d.ts +19 -0
- package/models/packages/react/forms/Form/SchemaForm/data.d.ts +40 -0
- package/models/packages/react/forms/Form/SchemaForm/index.d.ts +60 -0
- package/models/packages/react/forms/Form/index.d.ts +5 -0
- package/models/packages/react/forms/Input/index.d.ts +1 -0
- package/models/packages/react/forms/InputNumber/InputNumber.d.ts +25 -0
- package/models/packages/react/forms/InputNumber/index.d.ts +1 -0
- package/models/packages/react/forms/MultiSelect/MultiSelect.d.ts +26 -0
- package/models/packages/react/forms/MultiSelect/index.d.ts +1 -0
- package/models/packages/react/forms/Pagination/Pagination.d.ts +15 -0
- package/models/packages/react/forms/Pagination/index.d.ts +1 -0
- package/models/packages/react/forms/Radio/index.d.ts +2 -0
- package/models/packages/react/forms/Search/Search.d.ts +13 -0
- package/models/packages/react/forms/Search/index.d.ts +1 -0
- package/models/packages/react/forms/Select/Select.d.ts +32 -0
- package/models/packages/react/forms/Select/dropdownPositioning.d.ts +2 -0
- package/models/packages/react/forms/Select/index.d.ts +1 -0
- package/models/packages/react/forms/Switch/index.d.ts +1 -0
- package/models/packages/react/forms/TableSearch/TableSearch.d.ts +30 -0
- package/models/packages/react/forms/TableSearch/index.d.ts +2 -0
- package/models/packages/react/forms/TableSearch/lang.d.ts +16 -0
- package/models/packages/react/forms/Textarea/index.d.ts +1 -0
- package/models/packages/react/forms/TreeSelect/index.d.ts +1 -0
- package/models/packages/react/forms/Upload/index.d.ts +2 -0
- package/models/packages/react/forms/index.d.ts +16 -0
- package/models/packages/react/forms/table/index.d.ts +1 -0
- package/models/packages/react/i18n/I18nContext.d.ts +6 -0
- package/models/packages/react/i18n/I18nProvider.d.ts +6 -0
- package/models/packages/react/i18n/getUiReactLocale.d.ts +202 -0
- package/models/packages/react/i18n/index.d.ts +5 -0
- package/models/packages/react/i18n/legacy.d.ts +9 -0
- package/models/packages/react/i18n/locales/en-US.d.ts +1 -0
- package/models/packages/react/i18n/locales/zh-CN.d.ts +1 -0
- package/models/packages/react/i18n/useI18n.d.ts +2 -0
- package/models/packages/react/i18n/useI18nState.d.ts +3 -0
- package/models/packages/react/index.d.ts +6 -0
- package/models/packages/react/overlays/Dialog/index.d.ts +1 -0
- package/models/packages/react/overlays/Drawer/Drawer.d.ts +23 -0
- package/models/packages/react/overlays/Drawer/index.d.ts +2 -0
- package/models/packages/react/overlays/Dropdown/Dropdown.d.ts +34 -0
- package/models/packages/react/overlays/Dropdown/index.d.ts +1 -0
- package/models/packages/react/overlays/DropdownMenu/index.d.ts +8 -0
- package/models/packages/react/overlays/Message/index.d.ts +2 -0
- package/models/packages/react/overlays/Modal/Modal.d.ts +28 -0
- package/models/packages/react/overlays/Modal/ModalManager.d.ts +47 -0
- package/models/packages/react/overlays/Modal/index.d.ts +4 -0
- package/models/packages/react/overlays/Overlay/Overlay.d.ts +23 -0
- package/models/packages/react/overlays/Overlay/focusTypes.d.ts +8 -0
- package/models/packages/react/overlays/Overlay/index.d.ts +3 -0
- package/models/packages/react/overlays/Overlay/overlayStack.d.ts +16 -0
- package/models/packages/react/overlays/Popover/index.d.ts +1 -0
- package/models/packages/react/overlays/Popup/Popup.d.ts +26 -0
- package/models/packages/react/overlays/Popup/index.d.ts +1 -0
- package/models/packages/react/overlays/Tooltip/index.d.ts +1 -0
- package/models/packages/react/overlays/index.d.ts +10 -0
- package/models/packages/react/ui/components/ImagePreview/PreviewImage.d.ts +1 -1
- package/models/packages/react/ui/components/index.d.ts +3 -33
- package/models/packages/react/ui/i18n/useI18n.d.ts +6 -6
- package/package.json +129 -22
- package/ssr/STREAMING_BOOTSTRAP.md +360 -0
- package/types/app/ai/agent/agent-run.dto.d.ts +7 -0
- package/types/app/ai/agent/agent-scanner.service.d.ts +16 -0
- package/types/app/ai/agent/agent.interface.d.ts +13 -0
- package/types/app/ai/agent/agent.module.d.ts +2 -0
- package/types/app/ai/ai-config.module.d.ts +4 -0
- package/types/app/ai/ai-config.service.d.ts +14 -0
- package/types/app/ai/ai.controller.d.ts +3 -0
- package/types/app/ai/ai.module.d.ts +4 -0
- package/types/app/ai/contracts/index.d.ts +129 -0
- package/types/app/ai/declaration-paths.d.ts +3 -0
- package/types/app/ai/eval/assertions.d.ts +26 -0
- package/types/app/ai/guardrail/guardrail.interface.d.ts +10 -0
- package/types/app/ai/guardrail/guardrail.module.d.ts +2 -0
- package/types/app/ai/guardrail/guardrail.service.d.ts +11 -0
- package/types/app/ai/guardrail/internal/load-guardrail-config.d.ts +4 -0
- package/types/app/ai/index.d.ts +9 -0
- package/types/app/ai/mcp/internal/load-mcp-config.d.ts +7 -0
- package/types/app/ai/mcp/internal/read-sse-response.d.ts +2 -0
- package/types/app/ai/mcp/internal/stdio-process.d.ts +5 -0
- package/types/app/ai/mcp/mcp-registry.service.d.ts +13 -0
- package/types/app/ai/mcp/mcp.client.d.ts +44 -0
- package/types/app/ai/mcp/mcp.loader.d.ts +26 -0
- package/types/app/ai/mcp/mcp.module.d.ts +14 -0
- package/types/app/ai/mcp/mcp.types.d.ts +51 -0
- package/types/app/ai/memory/checkpoint.service.d.ts +15 -0
- package/types/app/ai/memory/internal/load-memory-config.d.ts +9 -0
- package/types/app/ai/memory/memory.module.d.ts +2 -0
- package/types/app/ai/memory/thread.service.d.ts +34 -0
- package/types/app/ai/models/chat-sse.d.ts +5 -0
- package/types/app/ai/models/chat.d.ts +22 -0
- package/types/app/ai/models/http.d.ts +20 -0
- package/types/app/ai/models/image.d.ts +69 -0
- package/types/app/ai/models/video.d.ts +99 -0
- package/types/app/ai/nest-service-provider.d.ts +6 -0
- package/types/app/ai/rag/chunker.d.ts +14 -0
- package/types/app/ai/rag/internal/load-embedding-config.d.ts +11 -0
- package/types/app/ai/rag/internal/load-rag-config.d.ts +16 -0
- package/types/app/ai/rag/rag.interface.d.ts +57 -0
- package/types/app/ai/rag/rag.module.d.ts +2 -0
- package/types/app/ai/rag/retriever.service.d.ts +18 -0
- package/types/app/ai/retention/conversation-retention.service.d.ts +19 -0
- package/types/app/ai/retention/retention-policy.d.ts +5 -0
- package/types/app/ai/runtime/ai-runtime-startup.validator.d.ts +10 -0
- package/types/app/ai/runtime/ai-runtime.d.ts +46 -0
- package/types/app/ai/runtime/internal/agent-run-context.d.ts +16 -0
- package/types/app/ai/runtime/internal/compact-tool-result.d.ts +21 -0
- package/types/app/ai/runtime/internal/context-compaction.service.d.ts +33 -0
- package/types/app/ai/runtime/internal/declaration-snapshot.d.ts +8 -0
- package/types/app/ai/runtime/internal/load-llm-config.d.ts +26 -0
- package/types/app/ai/runtime/internal/load-runtime-config.d.ts +13 -0
- package/types/app/ai/runtime/internal/owned-runtime-resources.d.ts +5 -0
- package/types/app/ai/runtime/internal/request-budget.d.ts +44 -0
- package/types/app/ai/runtime/internal/run-event-queue.d.ts +11 -0
- package/types/app/ai/runtime/langchain/langchain-planner.service.d.ts +49 -0
- package/types/app/ai/runtime/langchain/skill-tool.adapter.d.ts +9 -0
- package/types/app/ai/runtime/langgraph/agent.graph.d.ts +130 -0
- package/types/app/ai/runtime/langgraph/agent.state.d.ts +43 -0
- package/types/app/ai/runtime/langgraph/langgraph-orchestrator.service.d.ts +104 -0
- package/types/app/ai/runtime/runtime.module.d.ts +7 -0
- package/types/app/ai/runtime/thread-execution-coordinator.d.ts +21 -0
- package/types/app/ai/skill/skill-scanner.service.d.ts +16 -0
- package/types/app/ai/skill/skill.interface.d.ts +9 -0
- package/types/app/ai/skill/skill.module.d.ts +2 -0
- package/types/app/ai/snapshot-data.d.ts +1 -0
- package/types/app/ai/store/internal/archive-id.d.ts +1 -0
- package/types/app/ai/store/internal/create-vector-store.d.ts +4 -0
- package/types/app/ai/store/internal/load-store-config.d.ts +22 -0
- package/types/app/ai/store/internal/load-thread-state-store.d.ts +4 -0
- package/types/app/ai/store/reference/file-memory.store.d.ts +33 -0
- package/types/app/ai/store/reference/file-trace.store.d.ts +14 -0
- package/types/app/ai/store/reference/file-vector.store.d.ts +12 -0
- package/types/app/ai/store/reference/qdrant-vector.store.d.ts +9 -0
- package/types/app/ai/store/store.interface.d.ts +141 -0
- package/types/app/ai/store/store.module.d.ts +2 -0
- package/types/app/ai/tool/builtin/index.d.ts +6 -0
- package/types/app/ai/tool/builtin/invoke-agent.tool.d.ts +11 -0
- package/types/app/ai/tool/builtin/retrieve.tool.d.ts +8 -0
- package/types/app/ai/tool/executor.service.d.ts +14 -0
- package/types/app/ai/tool/tool-registry.service.d.ts +13 -0
- package/types/app/ai/tool/tool.interface.d.ts +33 -0
- package/types/app/ai/tool/tool.module.d.ts +9 -0
- package/types/app/ai/trace/trace.service.d.ts +32 -0
- package/types/app/csr/controller.d.ts +3 -0
- package/types/app/csr/types.d.ts +10 -0
- package/types/app/extends/$fetch.d.ts +1 -3
- package/types/app/extends/crypto.d.ts +3 -5
- package/types/app/extends/db.d.ts +5 -3
- package/types/app/extends/logger.d.ts +16 -10
- package/types/app/frontend-development.d.ts +14 -0
- package/types/app/html/browser-options.d.ts +3 -0
- package/types/app/html/shell.d.ts +37 -10
- package/types/app/http/api-signing.d.ts +16 -0
- package/types/app/http/body-parser.middleware.d.ts +13 -0
- package/types/app/http/compression.middleware.d.ts +7 -0
- package/types/app/http/context.d.ts +11 -0
- package/types/app/http/controller.d.ts +7 -0
- package/types/app/http/csp-nonce.d.ts +3 -0
- package/types/app/http/error-response.d.ts +4 -0
- package/types/app/http/errors.d.ts +25 -0
- package/types/app/http/exception-filter.d.ts +11 -0
- package/types/app/http/request-body-parser-policy.d.ts +8 -0
- package/types/app/http/request-data.d.ts +9 -0
- package/types/app/http/request-schema.pipe.d.ts +18 -0
- package/types/app/http/response.d.ts +10 -0
- package/types/app/http/response.interceptor.d.ts +5 -0
- package/types/app/http/security.guard.d.ts +14 -0
- package/types/app/project/controller.d.ts +3 -0
- package/types/app/project/service.d.ts +19 -0
- package/types/app/providers/csr.d.ts +21 -0
- package/types/app/providers/foundation.d.ts +8 -0
- package/types/app/ssr/artifacts.d.ts +28 -0
- package/types/app/ssr/controller.d.ts +3 -0
- package/types/app/ssr/html.d.ts +37 -10
- package/types/app/ssr/session.d.ts +44 -0
- package/types/app/ssr/stream.d.ts +5 -0
- package/types/app/ssr/streaming-request-cache.d.ts +10 -0
- package/types/app/ssr/types.d.ts +70 -0
- package/types/app/static-assets.middleware.d.ts +10 -0
- package/types/app/template-core.module.d.ts +12 -0
- package/types/app/utils/i18n.d.ts +7 -4
- package/types/bundler/buildFE.d.ts +4 -1
- package/types/bundler/buildSSR.d.ts +3 -2
- package/types/bundler/dev-session.d.ts +23 -0
- package/types/bundler/dev.d.ts +4 -1
- package/types/bundler/feSharedConfig.d.ts +3 -1
- package/types/bundler/index.d.ts +4 -0
- package/types/bundler/prod.d.ts +2 -1
- package/types/bundler/state.d.ts +16 -5
- package/types/bundler/utils.d.ts +18 -18
- package/types/config/config.default.d.ts +19 -3
- package/types/index.d.ts +48 -29
- package/types/packages/common/ssr/hydration.d.ts +13 -0
- package/types/packages/core/bootstrap.d.ts +5 -0
- package/types/packages/core/config-service.d.ts +13 -0
- package/types/packages/core/duplicate-route-checking-adapter.d.ts +23 -0
- package/types/packages/core/index.d.ts +8 -6
- package/types/packages/core/legacy-factory-diagnostics.d.ts +2 -0
- package/types/packages/core/loader/model.d.ts +14 -10
- package/types/packages/core/paths.d.ts +0 -14
- package/types/packages/core/resource-lifecycle.d.ts +7 -0
- package/types/packages/core/startup.d.ts +111 -0
- package/types/packages/core/tokens.d.ts +8 -0
- package/types/scripts/vite-build/types.d.ts +3 -0
- package/types/ssrSharedData/outputPaths.d.ts +2 -2
- package/.skills/tc-generator/reference/project-template/app/controller/product.js +0 -73
- package/.skills/tc-generator/reference/project-template/app/router/product.js +0 -9
- package/cjs/app/controller/base.js +0 -1
- package/cjs/app/controller/project.js +0 -1
- package/cjs/app/controller/ssr.js +0 -1
- package/cjs/app/controller/view.js +0 -1
- package/cjs/app/extends/generateErrorMessage.js +0 -1
- package/cjs/app/extends/localCacheHtmlEtag.js +0 -1
- package/cjs/app/extends/parsingParamsOnUrl.js +0 -1
- package/cjs/app/extends/render-view.js +0 -1
- package/cjs/app/middleware.js +0 -1
- package/cjs/app/middlewares/api-params-verify.js +0 -1
- package/cjs/app/middlewares/api-sign-verify.js +0 -1
- package/cjs/app/middlewares/error-handle.js +0 -1
- package/cjs/app/middlewares/project-handler.js +0 -1
- package/cjs/app/middlewares/request-parameter-parsing.js +0 -1
- package/cjs/app/router/project.js +0 -1
- package/cjs/app/router/ssr.js +0 -1
- package/cjs/app/router/view.js +0 -1
- package/cjs/app/router-schema/project.js +0 -1
- package/cjs/app/service/base.js +0 -1
- package/cjs/app/service/project.js +0 -1
- package/cjs/packages/core/env.js +0 -1
- package/cjs/packages/core/loader/config.js +0 -1
- package/cjs/packages/core/loader/controller.js +0 -1
- package/cjs/packages/core/loader/extend.js +0 -1
- package/cjs/packages/core/loader/merge.js +0 -1
- package/cjs/packages/core/loader/middleware.js +0 -1
- package/cjs/packages/core/loader/router-schema.js +0 -1
- package/cjs/packages/core/loader/router.js +0 -1
- package/cjs/packages/core/loader/service.js +0 -1
- package/esm/_virtual/_rolldown/runtime.js +0 -7
- package/esm/app/controller/base.js +0 -26
- package/esm/app/controller/project.js +0 -58
- package/esm/app/controller/ssr.js +0 -215
- package/esm/app/controller/view.js +0 -43
- package/esm/app/extends/generateErrorMessage.js +0 -7
- package/esm/app/extends/localCacheHtmlEtag.js +0 -41
- package/esm/app/extends/parsingParamsOnUrl.js +0 -14
- package/esm/app/extends/render-view.js +0 -18
- package/esm/app/middleware.js +0 -31
- package/esm/app/middlewares/api-params-verify.js +0 -56
- package/esm/app/middlewares/api-sign-verify.js +0 -16
- package/esm/app/middlewares/error-handle.js +0 -25
- package/esm/app/middlewares/project-handler.js +0 -16
- package/esm/app/middlewares/request-parameter-parsing.js +0 -18
- package/esm/app/router/project.js +0 -7
- package/esm/app/router/ssr.js +0 -8
- package/esm/app/router/view.js +0 -8
- package/esm/app/router-schema/project.js +0 -15
- package/esm/app/service/base.js +0 -14
- package/esm/app/service/project.js +0 -23
- package/esm/packages/core/env.js +0 -24
- package/esm/packages/core/loader/config.js +0 -29
- package/esm/packages/core/loader/controller.js +0 -15
- package/esm/packages/core/loader/extend.js +0 -32
- package/esm/packages/core/loader/merge.js +0 -7
- package/esm/packages/core/loader/middleware.js +0 -15
- package/esm/packages/core/loader/router-schema.js +0 -26
- package/esm/packages/core/loader/router.js +0 -45
- package/esm/packages/core/loader/service.js +0 -15
- package/fe/_virtual/_rolldown/runtime.js +0 -13
- package/fe/packages/react/hooks/index.d.ts +0 -11
- package/fe/packages/react/hooks/index.js +0 -10
- package/fe/packages/react/hooks/useBreadcrumb.d.ts +0 -9
- package/fe/packages/react/hooks/useBreadcrumb.js +0 -5
- package/fe/packages/react/hooks/useExecuteOnce.js +0 -47
- package/fe/packages/react/hooks/useHydrationData.d.ts +0 -2
- package/fe/packages/react/hooks/useHydrationData.js +0 -23
- package/fe/packages/react/hooks/useInit.js +0 -11
- package/fe/packages/react/hooks/useLanguage.d.ts +0 -1
- package/fe/packages/react/hooks/useLanguage.js +0 -8
- package/fe/packages/react/hooks/usePagination.js +0 -30
- package/fe/packages/react/hooks/useRefState.js +0 -45
- package/fe/packages/react/hooks/useSSR.js +0 -46
- package/fe/packages/react/hooks/useWatch.js +0 -60
- package/fe/packages/react/ui/components/Button/Button.js +0 -88
- package/fe/packages/react/ui/components/Button/SubmitButton.d.ts +0 -8
- package/fe/packages/react/ui/components/Button/SubmitButton.js +0 -30
- package/fe/packages/react/ui/components/Card/Card.js +0 -31
- package/fe/packages/react/ui/components/Checkbox/Checkbox.js +0 -52
- package/fe/packages/react/ui/components/ConfirmDialog/ConfirmDialog.js +0 -41
- package/fe/packages/react/ui/components/DataTable/ActionBtn.d.ts +0 -7
- package/fe/packages/react/ui/components/DataTable/ActionBtn.js +0 -116
- package/fe/packages/react/ui/components/DataTable/dataTableWidth.js +0 -33
- package/fe/packages/react/ui/components/Date/Calendar.js +0 -351
- package/fe/packages/react/ui/components/Date/Date.js +0 -210
- package/fe/packages/react/ui/components/Date/DateTestPage.d.ts +0 -1
- package/fe/packages/react/ui/components/Date/DateTestPage.js +0 -24
- package/fe/packages/react/ui/components/Date/LocaleContext.js +0 -36
- package/fe/packages/react/ui/components/Date/LocaleProvider.js +0 -22
- package/fe/packages/react/ui/components/Date/TimePicker.js +0 -136
- package/fe/packages/react/ui/components/Date/data.js +0 -7
- package/fe/packages/react/ui/components/Date/dateLocaleStore.js +0 -14
- package/fe/packages/react/ui/components/Date/dropdownPositioning.d.ts +0 -2
- package/fe/packages/react/ui/components/Date/dropdownPositioning.js +0 -12
- package/fe/packages/react/ui/components/Date/locales.d.ts +0 -30
- package/fe/packages/react/ui/components/Date/locales.js +0 -56
- package/fe/packages/react/ui/components/Drawer/Drawer.d.ts +0 -22
- package/fe/packages/react/ui/components/Drawer/Drawer.js +0 -151
- package/fe/packages/react/ui/components/Dropdown/Dropdown.d.ts +0 -24
- package/fe/packages/react/ui/components/Dropdown/Dropdown.js +0 -105
- package/fe/packages/react/ui/components/Form/Form.js +0 -15
- package/fe/packages/react/ui/components/Form/FormItem.d.ts +0 -19
- package/fe/packages/react/ui/components/Form/FormItem.js +0 -60
- package/fe/packages/react/ui/components/Form/SchemaForm/data.d.ts +0 -40
- package/fe/packages/react/ui/components/Form/SchemaForm/data.js +0 -15
- package/fe/packages/react/ui/components/Form/SchemaForm/defaultComponentsMap.js +0 -4
- package/fe/packages/react/ui/components/Form/SchemaForm/index.d.ts +0 -60
- package/fe/packages/react/ui/components/Form/SchemaForm/index.js +0 -119
- package/fe/packages/react/ui/components/Input/Input.js +0 -146
- package/fe/packages/react/ui/components/InputNumber/InputNumber.d.ts +0 -25
- package/fe/packages/react/ui/components/InputNumber/InputNumber.js +0 -207
- package/fe/packages/react/ui/components/InputNumber/inputNumberUtils.js +0 -45
- package/fe/packages/react/ui/components/Label/Label.d.ts +0 -21
- package/fe/packages/react/ui/components/Label/Label.js +0 -58
- package/fe/packages/react/ui/components/Layout/Layout.js +0 -33
- package/fe/packages/react/ui/components/Loading/Loading.js +0 -48
- package/fe/packages/react/ui/components/Menu/Menu.js +0 -147
- package/fe/packages/react/ui/components/Menu/MenuContext.js +0 -88
- package/fe/packages/react/ui/components/Menu/MenuItem.js +0 -78
- package/fe/packages/react/ui/components/Menu/SubMenu.js +0 -207
- package/fe/packages/react/ui/components/Menu/utils.js +0 -8
- package/fe/packages/react/ui/components/Message/Message.js +0 -76
- package/fe/packages/react/ui/components/Message/MessageManager.js +0 -104
- package/fe/packages/react/ui/components/Message/data.js +0 -4
- package/fe/packages/react/ui/components/Modal/Modal.d.ts +0 -20
- package/fe/packages/react/ui/components/Modal/Modal.js +0 -59
- package/fe/packages/react/ui/components/Modal/ModalManager.d.ts +0 -46
- package/fe/packages/react/ui/components/Modal/ModalManager.js +0 -106
- package/fe/packages/react/ui/components/Notification/Notification.js +0 -56
- package/fe/packages/react/ui/components/Pagination/Pagination.d.ts +0 -10
- package/fe/packages/react/ui/components/Pagination/Pagination.js +0 -115
- package/fe/packages/react/ui/components/Popup/Popup.d.ts +0 -25
- package/fe/packages/react/ui/components/Popup/Popup.js +0 -91
- package/fe/packages/react/ui/components/Radio/Radio.js +0 -36
- package/fe/packages/react/ui/components/Radio/RadioGroup.js +0 -33
- package/fe/packages/react/ui/components/Search/Search.d.ts +0 -13
- package/fe/packages/react/ui/components/Search/Search.js +0 -24
- package/fe/packages/react/ui/components/Select/Select.d.ts +0 -21
- package/fe/packages/react/ui/components/Select/Select.js +0 -282
- package/fe/packages/react/ui/components/Select/dropdownPositioning.d.ts +0 -2
- package/fe/packages/react/ui/components/Select/dropdownPositioning.js +0 -16
- package/fe/packages/react/ui/components/Skeleton/Skeleton.js +0 -101
- package/fe/packages/react/ui/components/Switch/Switch.js +0 -28
- package/fe/packages/react/ui/components/TableSearch/TableSearch.d.ts +0 -30
- package/fe/packages/react/ui/components/TableSearch/TableSearch.js +0 -166
- package/fe/packages/react/ui/components/TableSearch/lang.d.ts +0 -16
- package/fe/packages/react/ui/components/TableSearch/lang.js +0 -25
- package/fe/packages/react/ui/components/TableSearch/tableSearchLocaleStore.js +0 -10
- package/fe/packages/react/ui/components/Textarea/Textarea.js +0 -58
- package/fe/packages/react/ui/components/Tooltip/Tooltip.js +0 -77
- package/fe/packages/react/ui/components/TreeSelect/TreeSelect.js +0 -190
- package/fe/packages/react/ui/components/Upload/ImageUpload.js +0 -101
- package/fe/packages/react/ui/components/Upload/Upload.js +0 -29
- package/fe/packages/react/ui/components/breadcrumb/breadcrumb.js +0 -155
- package/fe/packages/react/ui/components/hooks/useDropdownPositioning.js +0 -121
- package/fe/packages/react/ui/components/hooks/useInputController.js +0 -39
- package/fe/packages/react/ui/components/table/table.js +0 -166
- package/fe/packages/react/ui/components/testPage/DemoSection.d.ts +0 -10
- package/fe/packages/react/ui/components/testPage/DemoSection.js +0 -73
- package/fe/packages/react/ui/components/testPage/MenuTestPage.js +0 -24
- package/fe/packages/react/ui/components/testPage/demoRegistry.d.ts +0 -4
- package/fe/packages/react/ui/components/testPage/demoRegistry.js +0 -217
- package/fe/packages/react/ui/components/testPage/demos/core/BreadcrumbDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/BreadcrumbDemo.js +0 -44
- package/fe/packages/react/ui/components/testPage/demos/core/BreadcrumbDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/ButtonDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/ButtonDemo.js +0 -85
- package/fe/packages/react/ui/components/testPage/demos/core/ButtonDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/CardDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/CardDemo.js +0 -52
- package/fe/packages/react/ui/components/testPage/demos/core/CardDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/CheckboxDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/CheckboxDemo.js +0 -41
- package/fe/packages/react/ui/components/testPage/demos/core/CheckboxDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/ConfirmDialogDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/ConfirmDialogDemo.js +0 -35
- package/fe/packages/react/ui/components/testPage/demos/core/ConfirmDialogDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/DataTableDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/DataTableDemo.js +0 -273
- package/fe/packages/react/ui/components/testPage/demos/core/DataTableDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/DrawerDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/DrawerDemo.js +0 -105
- package/fe/packages/react/ui/components/testPage/demos/core/DrawerDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/DropdownDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/DropdownDemo.js +0 -48
- package/fe/packages/react/ui/components/testPage/demos/core/DropdownDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/FormDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/FormDemo.js +0 -56
- package/fe/packages/react/ui/components/testPage/demos/core/FormDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/ImageUploadDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/ImageUploadDemo.js +0 -26
- package/fe/packages/react/ui/components/testPage/demos/core/ImageUploadDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/InputDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/InputDemo.js +0 -55
- package/fe/packages/react/ui/components/testPage/demos/core/InputDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/InputNumberDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/InputNumberDemo.js +0 -65
- package/fe/packages/react/ui/components/testPage/demos/core/InputNumberDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/LabelDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/LabelDemo.js +0 -33
- package/fe/packages/react/ui/components/testPage/demos/core/LabelDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/LayoutDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/LayoutDemo.js +0 -64
- package/fe/packages/react/ui/components/testPage/demos/core/LayoutDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/LoadingDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/LoadingDemo.js +0 -32
- package/fe/packages/react/ui/components/testPage/demos/core/LoadingDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/MessageDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/MessageDemo.js +0 -44
- package/fe/packages/react/ui/components/testPage/demos/core/MessageDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/ModalDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/ModalDemo.js +0 -61
- package/fe/packages/react/ui/components/testPage/demos/core/ModalDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/NotificationDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/NotificationDemo.js +0 -50
- package/fe/packages/react/ui/components/testPage/demos/core/NotificationDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/PaginationDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/PaginationDemo.js +0 -39
- package/fe/packages/react/ui/components/testPage/demos/core/PaginationDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/PreviewImageDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/PreviewImageDemo.js +0 -22
- package/fe/packages/react/ui/components/testPage/demos/core/PreviewImageDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/RadioDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/RadioDemo.js +0 -129
- package/fe/packages/react/ui/components/testPage/demos/core/RadioDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/SchemaFormDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/SchemaFormDemo.js +0 -52
- package/fe/packages/react/ui/components/testPage/demos/core/SchemaFormDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/SearchDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/SearchDemo.js +0 -52
- package/fe/packages/react/ui/components/testPage/demos/core/SearchDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/SelectDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/SelectDemo.js +0 -73
- package/fe/packages/react/ui/components/testPage/demos/core/SelectDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/SkeletonDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/SkeletonDemo.js +0 -46
- package/fe/packages/react/ui/components/testPage/demos/core/SkeletonDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/SwitchDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/SwitchDemo.js +0 -36
- package/fe/packages/react/ui/components/testPage/demos/core/SwitchDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/TableDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/TableDemo.js +0 -64
- package/fe/packages/react/ui/components/testPage/demos/core/TableDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/TableSearchDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/TableSearchDemo.js +0 -74
- package/fe/packages/react/ui/components/testPage/demos/core/TableSearchDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/TabsDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/TabsDemo.js +0 -56
- package/fe/packages/react/ui/components/testPage/demos/core/TabsDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/TextareaDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/TextareaDemo.js +0 -30
- package/fe/packages/react/ui/components/testPage/demos/core/TextareaDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/ThemeSwitcher.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/ThemeSwitcher.js +0 -96
- package/fe/packages/react/ui/components/testPage/demos/core/ThemeSwitcher2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/TooltipDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/TooltipDemo.js +0 -29
- package/fe/packages/react/ui/components/testPage/demos/core/TooltipDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/core/TreeSelectDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/core/TreeSelectDemo.js +0 -66
- package/fe/packages/react/ui/components/testPage/demos/core/TreeSelectDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/date/DateBasicDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/date/DateBasicDemo.js +0 -31
- package/fe/packages/react/ui/components/testPage/demos/date/DateBasicDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/date/DateControlledDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/date/DateControlledDemo.js +0 -67
- package/fe/packages/react/ui/components/testPage/demos/date/DateControlledDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDateDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDateDemo.js +0 -36
- package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDateDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDemo.js +0 -35
- package/fe/packages/react/ui/components/testPage/demos/date/DateDisabledDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/date/DateFormatDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/date/DateFormatDemo.js +0 -35
- package/fe/packages/react/ui/components/testPage/demos/date/DateFormatDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/date/DateRangeDemo.d.ts +0 -6
- package/fe/packages/react/ui/components/testPage/demos/date/DateRangeDemo.js +0 -76
- package/fe/packages/react/ui/components/testPage/demos/date/DateRangeDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/date/DateTimeDemo.d.ts +0 -7
- package/fe/packages/react/ui/components/testPage/demos/date/DateTimeDemo.js +0 -60
- package/fe/packages/react/ui/components/testPage/demos/date/DateTimeDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuAccordionDemo.d.ts +0 -7
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuAccordionDemo.js +0 -78
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuAccordionDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuClickTriggerDemo.d.ts +0 -7
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuClickTriggerDemo.js +0 -79
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuClickTriggerDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedDemo.d.ts +0 -7
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedDemo.js +0 -82
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedNoIconDemo.d.ts +0 -7
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedNoIconDemo.js +0 -44
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuCollapsedNoIconDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuJsxDemo.d.ts +0 -7
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuJsxDemo.js +0 -64
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuJsxDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuLeftMultipleDemo.d.ts +0 -7
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuLeftMultipleDemo.js +0 -81
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuLeftMultipleDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuPopupDemo.d.ts +0 -7
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuPopupDemo.js +0 -56
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuPopupDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuStateDemo.d.ts +0 -7
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuStateDemo.js +0 -67
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuStateDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuTopDemo.d.ts +0 -7
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuTopDemo.js +0 -55
- package/fe/packages/react/ui/components/testPage/demos/menu/MenuTopDemo2.js +0 -4
- package/fe/packages/react/ui/components/testPage/index.d.ts +0 -2
- package/fe/packages/react/ui/components/testPage/index.js +0 -45
- package/fe/packages/react/ui/components/testPage/types.d.ts +0 -17
- package/fe/packages/react/ui/lib/createStoreHook.js +0 -9
- package/fe/packages/react/ui/lib/export.d.ts +0 -21
- package/fe/packages/react/ui/lib/export.js +0 -112
- package/fe/packages/react/ui/lib/utils.d.ts +0 -9
- package/fe/packages/react/ui/lib/utils.js +0 -64
- package/fe/packages/react/ui/stores/breadcrumb.d.ts +0 -14
- package/fe/packages/react/ui/stores/breadcrumb.js +0 -52
- package/fe/packages/react/ui/stores/language.d.ts +0 -3
- package/fe/packages/react/ui/stores/language.js +0 -4
- package/models/packages/react/hooks/useBreadcrumb.d.ts +0 -9
- package/models/packages/react/hooks/useLanguage.d.ts +0 -1
- package/models/packages/react/ui/components/Button/SubmitButton.d.ts +0 -8
- package/models/packages/react/ui/components/DataTable/ActionBtn.d.ts +0 -7
- package/models/packages/react/ui/components/DataTable/index.d.ts +0 -32
- package/models/packages/react/ui/components/Date/dropdownPositioning.d.ts +0 -2
- package/models/packages/react/ui/components/Date/locales.d.ts +0 -30
- package/models/packages/react/ui/components/Drawer/Drawer.d.ts +0 -22
- package/models/packages/react/ui/components/Dropdown/Dropdown.d.ts +0 -24
- package/models/packages/react/ui/components/Form/FormItem.d.ts +0 -19
- package/models/packages/react/ui/components/Form/SchemaForm/data.d.ts +0 -40
- package/models/packages/react/ui/components/Form/SchemaForm/index.d.ts +0 -60
- package/models/packages/react/ui/components/Form/index.d.ts +0 -4
- package/models/packages/react/ui/components/InputNumber/InputNumber.d.ts +0 -25
- package/models/packages/react/ui/components/Label/Label.d.ts +0 -21
- package/models/packages/react/ui/components/Modal/Modal.d.ts +0 -20
- package/models/packages/react/ui/components/Modal/ModalManager.d.ts +0 -46
- package/models/packages/react/ui/components/Modal/index.d.ts +0 -3
- package/models/packages/react/ui/components/Overlay/Overlay.d.ts +0 -19
- package/models/packages/react/ui/components/Overlay/index.d.ts +0 -2
- package/models/packages/react/ui/components/Pagination/Pagination.d.ts +0 -10
- package/models/packages/react/ui/components/Popup/Popup.d.ts +0 -25
- package/models/packages/react/ui/components/Search/Search.d.ts +0 -13
- package/models/packages/react/ui/components/Select/Select.d.ts +0 -21
- package/models/packages/react/ui/components/Select/dropdownPositioning.d.ts +0 -2
- package/models/packages/react/ui/components/TableSearch/TableSearch.d.ts +0 -30
- package/models/packages/react/ui/components/TableSearch/lang.d.ts +0 -16
- package/models/packages/react/ui/i18n/I18nProvider.d.ts +0 -12
- package/models/packages/react/ui/i18n/index.d.ts +0 -3
- package/models/packages/react/ui/index.d.ts +0 -4
- package/models/packages/react/ui/lib/export.d.ts +0 -21
- package/models/packages/react/ui/lib/utils.d.ts +0 -9
- package/models/packages/react/ui/stores/breadcrumb.d.ts +0 -14
- package/models/packages/react/ui/stores/language.d.ts +0 -3
- package/types/app/controller/base.d.ts +0 -12
- package/types/app/controller/project.d.ts +0 -22
- package/types/app/controller/ssr.d.ts +0 -14
- package/types/app/controller/view.d.ts +0 -8
- package/types/app/extends/generateErrorMessage.d.ts +0 -7
- package/types/app/extends/localCacheHtmlEtag.d.ts +0 -10
- package/types/app/extends/parsingParamsOnUrl.d.ts +0 -2
- package/types/app/extends/render-view.d.ts +0 -7
- package/types/app/middleware.d.ts +0 -3
- package/types/app/middlewares/api-params-verify.d.ts +0 -4
- package/types/app/middlewares/api-sign-verify.d.ts +0 -4
- package/types/app/middlewares/error-handle.d.ts +0 -4
- package/types/app/middlewares/project-handler.d.ts +0 -4
- package/types/app/middlewares/request-parameter-parsing.d.ts +0 -7
- package/types/app/router/project.d.ts +0 -4
- package/types/app/router/ssr.d.ts +0 -6
- package/types/app/router/view.d.ts +0 -3
- package/types/app/router-schema/project.d.ts +0 -3
- package/types/app/service/base.d.ts +0 -9
- package/types/app/service/project.d.ts +0 -57
- package/types/app/type.d.ts +0 -35
- package/types/app/typings.d.ts +0 -50
- package/types/packages/core/env.d.ts +0 -15
- package/types/packages/core/loader/config.d.ts +0 -9
- package/types/packages/core/loader/controller.d.ts +0 -17
- package/types/packages/core/loader/extend.d.ts +0 -8
- package/types/packages/core/loader/merge.d.ts +0 -3
- package/types/packages/core/loader/middleware.d.ts +0 -11
- package/types/packages/core/loader/router-schema.d.ts +0 -18
- package/types/packages/core/loader/router.d.ts +0 -8
- package/types/packages/core/loader/service.d.ts +0 -17
- package/types/packages/core/types.d.ts +0 -158
- /package/cjs/app/{type.js → ai/agent/agent-run.dto.js} +0 -0
- /package/cjs/app/{typings.js → ai/agent/agent.interface.js} +0 -0
- /package/{fe/packages/react/ui/types → cjs/app/ai/contracts}/index.js +0 -0
- /package/cjs/{packages/core/types.js → app/ai/guardrail/guardrail.interface.js} +0 -0
- /package/{esm/app/type.js → cjs/app/ai/skill/skill.interface.js} +0 -0
- /package/{esm/app/typings.js → cjs/app/ai/tool/tool.interface.js} +0 -0
- /package/{esm/packages/core → cjs/app/csr}/types.js +0 -0
- /package/{fe/packages/react/ui/components/testPage → cjs/app/ssr}/types.js +0 -0
- /package/{fe/packages/react/ui/components/Menu/menuTypes.js → esm/app/ai/agent/agent-run.dto.js} +0 -0
- /package/fe/packages/react/{ui/assets → assets}/table/no-result.svg +0 -0
- /package/fe/packages/react/{ui/components → core}/Button/Button.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/core}/Button/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → core}/Card/Card.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/core}/Card/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → core}/Checkbox/Checkbox.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/core}/Checkbox/index.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/core}/Label/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → core}/Layout/Layout.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/core}/Layout/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → core}/Loading/Loading.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/core}/Loading/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → core}/Skeleton/Skeleton.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/core}/Skeleton/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → core}/breadcrumb/breadcrumb.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/core}/breadcrumb/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → core}/hooks/useDropdownPositioning.d.ts +0 -0
- /package/fe/packages/react/{hooks → core/hooks}/useExecuteOnce.d.ts +0 -0
- /package/fe/packages/react/{hooks → core/hooks}/useInit.d.ts +0 -0
- /package/fe/packages/react/{ui/components → core}/hooks/useInputController.d.ts +0 -0
- /package/fe/packages/react/{hooks → core/hooks}/usePagination.d.ts +0 -0
- /package/fe/packages/react/{hooks → core/hooks}/useRefState.d.ts +0 -0
- /package/fe/packages/react/{hooks → core/hooks}/useSSR.d.ts +0 -0
- /package/fe/packages/react/{hooks → core/hooks}/useWatch.d.ts +0 -0
- /package/fe/packages/react/{ui → core}/lib/createStoreHook.d.ts +0 -0
- /package/fe/packages/react/{ui/components/DataTable → core/lib}/dataTableWidth.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/core}/types/baseType.d.ts +0 -0
- /package/fe/packages/react/{ui → core}/types/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components/testPage → dev/preview}/MenuTestPage.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Date/Calendar.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Date/Date.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Date/LocaleContext.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Date/LocaleProvider.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Date/TimePicker.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Date/data.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Date/dateLocaleStore.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/Date/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Form/Form.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Form/SchemaForm/defaultComponentsMap.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Form/useForm.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Form/useForm.js +0 -0
- /package/fe/packages/react/{ui/components → forms}/Input/Input.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/Input/index.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/InputNumber/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/InputNumber/inputNumberUtils.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/Pagination/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Radio/Radio.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Radio/RadioGroup.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/Radio/index.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/Search/index.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/Select/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Switch/Switch.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/Switch/index.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/TableSearch/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/TableSearch/tableSearchLocaleStore.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Textarea/Textarea.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/Textarea/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/TreeSelect/TreeSelect.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/TreeSelect/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Upload/ImageUpload.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/Upload/Upload.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/Upload/index.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/forms}/table/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → forms}/table/table.d.ts +0 -0
- /package/fe/packages/react/{ui/components/ConfirmDialog → overlays/Dialog}/ConfirmDialog.d.ts +0 -0
- /package/{models/packages/react/ui/components/ConfirmDialog → fe/packages/react/overlays/Dialog}/index.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Drawer/index.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Dropdown/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/Menu.d.ts +0 -0
- /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/MenuContext.d.ts +0 -0
- /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/MenuItem.d.ts +0 -0
- /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/SubMenu.d.ts +0 -0
- /package/{models/packages/react/ui/components/Menu → fe/packages/react/overlays/DropdownMenu}/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/menuTypes.d.ts +0 -0
- /package/fe/packages/react/{ui/components/Menu → overlays/DropdownMenu}/utils.d.ts +0 -0
- /package/fe/packages/react/{ui/components → overlays}/Message/Message.d.ts +0 -0
- /package/fe/packages/react/{ui/components → overlays}/Message/MessageManager.d.ts +0 -0
- /package/fe/packages/react/{ui/components → overlays}/Message/data.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Message/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components/Notification → overlays/Popover}/Notification.d.ts +0 -0
- /package/{models/packages/react/ui/components/Notification → fe/packages/react/overlays/Popover}/index.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Popup/index.d.ts +0 -0
- /package/fe/packages/react/{ui/components → overlays}/Tooltip/Tooltip.d.ts +0 -0
- /package/{models/packages/react/ui/components → fe/packages/react/overlays}/Tooltip/index.d.ts +0 -0
- /package/models/packages/react/{ui/components → core}/Button/Button.d.ts +0 -0
- /package/models/packages/react/{ui/components → core}/Card/Card.d.ts +0 -0
- /package/models/packages/react/{ui/components → core}/Checkbox/Checkbox.d.ts +0 -0
- /package/models/packages/react/{ui/components → core}/Layout/Layout.d.ts +0 -0
- /package/models/packages/react/{ui/components → core}/Loading/Loading.d.ts +0 -0
- /package/models/packages/react/{ui/components → core}/Skeleton/Skeleton.d.ts +0 -0
- /package/models/packages/react/{ui/components → core}/breadcrumb/breadcrumb.d.ts +0 -0
- /package/models/packages/react/{ui/components → core}/hooks/useDropdownPositioning.d.ts +0 -0
- /package/models/packages/react/{hooks → core/hooks}/useExecuteOnce.d.ts +0 -0
- /package/models/packages/react/{ui/components → core}/hooks/useInputController.d.ts +0 -0
- /package/models/packages/react/{ui → core}/lib/createStoreHook.d.ts +0 -0
- /package/models/packages/react/{ui/components/DataTable → core/lib}/dataTableWidth.d.ts +0 -0
- /package/models/packages/react/{ui → core}/types/index.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Date/Calendar.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Date/Date.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Date/LocaleContext.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Date/LocaleProvider.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Date/TimePicker.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Date/data.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Date/dateLocaleStore.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Form/Form.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Form/useForm.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Input/Input.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/InputNumber/inputNumberUtils.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Radio/Radio.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Radio/RadioGroup.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Switch/Switch.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/TableSearch/tableSearchLocaleStore.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Textarea/Textarea.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/TreeSelect/TreeSelect.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Upload/ImageUpload.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/Upload/Upload.d.ts +0 -0
- /package/models/packages/react/{ui/components → forms}/table/table.d.ts +0 -0
- /package/models/packages/react/{ui/components/ConfirmDialog → overlays/Dialog}/ConfirmDialog.d.ts +0 -0
- /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/Menu.d.ts +0 -0
- /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/MenuContext.d.ts +0 -0
- /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/MenuItem.d.ts +0 -0
- /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/SubMenu.d.ts +0 -0
- /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/menuTypes.d.ts +0 -0
- /package/models/packages/react/{ui/components/Menu → overlays/DropdownMenu}/utils.d.ts +0 -0
- /package/models/packages/react/{ui/components → overlays}/Message/Message.d.ts +0 -0
- /package/models/packages/react/{ui/components → overlays}/Message/MessageManager.d.ts +0 -0
- /package/models/packages/react/{ui/components → overlays}/Message/data.d.ts +0 -0
- /package/models/packages/react/{ui/components/Notification → overlays/Popover}/Notification.d.ts +0 -0
- /package/models/packages/react/{ui/components → overlays}/Tooltip/Tooltip.d.ts +0 -0
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import { resolveMaxIterations as e } from "../internal/load-runtime-config.js";
|
|
2
|
+
import { createArchiveMessageId as t } from "../../store/internal/archive-id.js";
|
|
3
|
+
import { agentRunContext as n } from "../internal/agent-run-context.js";
|
|
4
|
+
import { RunEventQueue as r } from "../internal/run-event-queue.js";
|
|
5
|
+
import { InProcessThreadExecutionCoordinator as i } from "../thread-execution-coordinator.js";
|
|
6
|
+
import { toStructuredTools as a } from "../langchain/skill-tool.adapter.js";
|
|
7
|
+
import { hasOutput as o } from "./agent.state.js";
|
|
8
|
+
import { AGENT_GRAPH_EDGES as s, AGENT_GRAPH_NODES as c, buildAgentGraph as l } from "./agent.graph.js";
|
|
9
|
+
//#region app/ai/runtime/langgraph/langgraph-orchestrator.service.ts
|
|
10
|
+
var u = class extends Error {
|
|
11
|
+
code = "THREAD_MIGRATION_CONFLICT";
|
|
12
|
+
retryable = !0;
|
|
13
|
+
constructor(e) {
|
|
14
|
+
super(`[ai] thread ${e} changed after migration preview; create a new preview`), this.name = "ThreadMigrationConflictError";
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
function d(e) {
|
|
18
|
+
return typeof e == "string" ? e : e == null ? "" : JSON.stringify(e);
|
|
19
|
+
}
|
|
20
|
+
var f = class {
|
|
21
|
+
threadExecutionCoordinator;
|
|
22
|
+
runtimeId = Symbol("AgentRuntime");
|
|
23
|
+
lifecycleState = "open";
|
|
24
|
+
activeOperations = 0;
|
|
25
|
+
drainResolve;
|
|
26
|
+
closePromise;
|
|
27
|
+
constructor(e, t, n, r, a, o, s, c, l, u, d, f, p, m) {
|
|
28
|
+
this.planner = e, this.executor = t, this.agentScanner = n, this.skillScanner = r, this.toolRegistry = a, this.traceService = o, this.guardrailService = s, this.threadService = c, this.checkpointService = l, this.configService = u, this.contextCompactionService = d, this.conversationRetention = p, this.closeOwnedResources = m, this.threadExecutionCoordinator = f ?? new i();
|
|
29
|
+
}
|
|
30
|
+
getGraph() {
|
|
31
|
+
return {
|
|
32
|
+
nodes: [...c],
|
|
33
|
+
edges: s.map((e) => ({ ...e }))
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
async inspectThreadContext(e) {
|
|
37
|
+
return this.withOperation(() => this.inspectThreadContextInternal(e));
|
|
38
|
+
}
|
|
39
|
+
async inspectThreadContextInternal(e) {
|
|
40
|
+
let t = this.requireThreadId(e);
|
|
41
|
+
return this.threadExecutionCoordinator.runExclusive(t, async () => {
|
|
42
|
+
let { checkpoint: e, archiveRevision: n } = await this.checkpointService.loadThreadState(t);
|
|
43
|
+
return {
|
|
44
|
+
threadId: t,
|
|
45
|
+
agentId: e?.agentId ?? "",
|
|
46
|
+
pinnedContext: e ? structuredClone(e.pinnedContext) : null,
|
|
47
|
+
rollingSummary: e ? structuredClone(e.rollingSummary) : null,
|
|
48
|
+
summarizedThroughSeq: e?.summarizedThroughSeq ?? 0,
|
|
49
|
+
checkpointRevision: e?.revision ?? 0,
|
|
50
|
+
archiveRevision: n
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
async previewThreadMigration(e, t) {
|
|
55
|
+
return this.withOperation(() => this.previewThreadMigrationInternal(e, t));
|
|
56
|
+
}
|
|
57
|
+
async previewThreadMigrationInternal(e, n) {
|
|
58
|
+
let r = this.requireThreadId(e), i = typeof n == "string" ? n.trim() : "";
|
|
59
|
+
if (i === "") throw Error("[ai] target Agent is required for thread migration");
|
|
60
|
+
let a = this.agentScanner.get(i);
|
|
61
|
+
if (!a) throw Error(`[ai] agent 未注册:${i}`);
|
|
62
|
+
await this.conversationRetention?.assertNotExpired(r);
|
|
63
|
+
let o = await this.threadExecutionCoordinator.runExclusive(r, async () => {
|
|
64
|
+
let { checkpoint: e, archive: n, archiveRevision: i } = await this.checkpointService.loadThreadState(r), a = e ?? this.checkpointService.createInitialCheckpoint(r, "", ""), o = n.length === 0 && e?.messages?.length ? e.messages.map(() => t()) : [];
|
|
65
|
+
if (n.length === 0 && a.summarizedThroughSeq !== 0 && o.length > 0) throw Error("[ai] legacy checkpoint cursor cannot be matched to its messages");
|
|
66
|
+
let s = n.length === 0 ? (e?.messages ?? []).map((e, t) => {
|
|
67
|
+
let n = o[t];
|
|
68
|
+
if (!n) throw Error("[ai] legacy checkpoint message could not be assigned an archive id");
|
|
69
|
+
return {
|
|
70
|
+
threadId: r,
|
|
71
|
+
seq: t + 1,
|
|
72
|
+
messageId: n,
|
|
73
|
+
role: e.role,
|
|
74
|
+
content: e.content,
|
|
75
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
76
|
+
};
|
|
77
|
+
}) : [], c = {
|
|
78
|
+
...a.pinnedContext,
|
|
79
|
+
initialGoal: a.pinnedContext.initialGoal || s[0]?.content || n.find((e) => e.role === "user")?.content || "",
|
|
80
|
+
latestUserDirection: a.pinnedContext.latestUserDirection || ""
|
|
81
|
+
};
|
|
82
|
+
return {
|
|
83
|
+
checkpoint: {
|
|
84
|
+
...a,
|
|
85
|
+
pinnedContext: c
|
|
86
|
+
},
|
|
87
|
+
archive: [...n, ...s],
|
|
88
|
+
archiveRevision: i,
|
|
89
|
+
legacyMessageIds: o
|
|
90
|
+
};
|
|
91
|
+
}), s = await this.contextCompactionService.summarizeForMigration(o.checkpoint, o.archive, a.summaryModel ?? a.model);
|
|
92
|
+
return {
|
|
93
|
+
threadId: r,
|
|
94
|
+
sourceAgentId: o.checkpoint.agentId,
|
|
95
|
+
targetAgentId: a.name,
|
|
96
|
+
checkpointRevision: o.checkpoint.revision,
|
|
97
|
+
archiveRevision: o.archiveRevision,
|
|
98
|
+
candidatePinnedContext: {
|
|
99
|
+
...structuredClone(o.checkpoint.pinnedContext),
|
|
100
|
+
...s.latestUserDirection === void 0 ? {} : { latestUserDirection: s.latestUserDirection }
|
|
101
|
+
},
|
|
102
|
+
candidateSummary: structuredClone(s.rollingSummary),
|
|
103
|
+
coveredThroughSeq: s.summarizedThroughSeq,
|
|
104
|
+
legacyMessageIds: o.legacyMessageIds
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
async confirmThreadMigration(e) {
|
|
108
|
+
return this.withOperation(() => this.confirmThreadMigrationInternal(e));
|
|
109
|
+
}
|
|
110
|
+
async confirmThreadMigrationInternal(e) {
|
|
111
|
+
let t = this.requireThreadId(e?.threadId);
|
|
112
|
+
return this.threadExecutionCoordinator.runExclusive(t, async () => {
|
|
113
|
+
let n = this.agentScanner.get(e.targetAgentId);
|
|
114
|
+
if (!n || n.name !== e.targetAgentId) throw Error(`[ai] target Agent is no longer registered: ${e.targetAgentId}`);
|
|
115
|
+
let { checkpoint: r, archive: i, archiveRevision: a } = await this.checkpointService.loadThreadState(t), o = r?.revision ?? 0;
|
|
116
|
+
if (o !== e.checkpointRevision || a !== e.archiveRevision || (r?.agentId ?? "") !== e.sourceAgentId) throw new u(t);
|
|
117
|
+
let s = i.length === 0 ? r?.messages ?? [] : [];
|
|
118
|
+
if (e.legacyMessageIds.length !== s.length) throw new u(t);
|
|
119
|
+
let c = s.map((n, r) => {
|
|
120
|
+
let i = e.legacyMessageIds[r];
|
|
121
|
+
if (!i) throw new u(t);
|
|
122
|
+
return {
|
|
123
|
+
threadId: t,
|
|
124
|
+
seq: e.archiveRevision + r + 1,
|
|
125
|
+
messageId: i,
|
|
126
|
+
role: n.role,
|
|
127
|
+
content: n.content,
|
|
128
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
129
|
+
};
|
|
130
|
+
}), l = e.archiveRevision + c.length, d = r ?? this.checkpointService.createInitialCheckpoint(t, "", "");
|
|
131
|
+
if (!Number.isSafeInteger(e.coveredThroughSeq) || e.coveredThroughSeq < d.summarizedThroughSeq || e.coveredThroughSeq > l) throw Error("[ai] migration preview contains an invalid summary cursor");
|
|
132
|
+
let f = {
|
|
133
|
+
...d,
|
|
134
|
+
agentId: n.name,
|
|
135
|
+
pinnedContext: structuredClone(e.candidatePinnedContext),
|
|
136
|
+
rollingSummary: structuredClone(e.candidateSummary),
|
|
137
|
+
summarizedThroughSeq: e.coveredThroughSeq,
|
|
138
|
+
revision: o,
|
|
139
|
+
updatedAt: Date.now()
|
|
140
|
+
};
|
|
141
|
+
if (delete f.messages, !await this.checkpointService.commitMigration(f, e.archiveRevision, o, c)) throw new u(t);
|
|
142
|
+
let p = await this.checkpointService.load(t);
|
|
143
|
+
if (!p) throw Error(`[ai] migrated checkpoint could not be reloaded for ${t}`);
|
|
144
|
+
return p;
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
requireThreadId(e) {
|
|
148
|
+
let t = typeof e == "string" ? e.trim() : "";
|
|
149
|
+
if (t === "") throw Error("[ai] threadId is required");
|
|
150
|
+
return t;
|
|
151
|
+
}
|
|
152
|
+
async run(e, t, n, r, i = {}) {
|
|
153
|
+
return this.withOperation(async () => {
|
|
154
|
+
let a = this.threadService.ensureThread(n);
|
|
155
|
+
return this.threadExecutionCoordinator.runExclusive(a, () => this.runExclusive(e, t, a, r, i));
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
async close() {
|
|
159
|
+
if (this.activeParent()) throw Error("[ai] runtime.close() cannot be called from an active run");
|
|
160
|
+
return this.closePromise ? this.closePromise : (this.lifecycleState = "closing", this.closePromise = this.drainAndClose(), this.closePromise);
|
|
161
|
+
}
|
|
162
|
+
onModuleDestroy() {
|
|
163
|
+
return this.close();
|
|
164
|
+
}
|
|
165
|
+
async withOperation(e) {
|
|
166
|
+
let t = this.acceptOperation();
|
|
167
|
+
try {
|
|
168
|
+
return await e();
|
|
169
|
+
} finally {
|
|
170
|
+
t();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
activeParent() {
|
|
174
|
+
let e = n.getStore();
|
|
175
|
+
return e?.runtimeId === this.runtimeId && e.lease?.active ? e : void 0;
|
|
176
|
+
}
|
|
177
|
+
acceptOperation() {
|
|
178
|
+
if (this.lifecycleState !== "open" && !this.activeParent()) throw Error("[ai] runtime is closing and cannot accept a new run");
|
|
179
|
+
this.activeOperations += 1;
|
|
180
|
+
let e = !1;
|
|
181
|
+
return () => {
|
|
182
|
+
e || (e = !0, --this.activeOperations, this.lifecycleState === "closing" && this.activeOperations === 0 && (this.drainResolve?.(), this.drainResolve = void 0));
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
async drainAndClose() {
|
|
186
|
+
try {
|
|
187
|
+
if (this.activeOperations > 0 && await new Promise((e) => {
|
|
188
|
+
this.drainResolve = e;
|
|
189
|
+
}), this.closeOwnedResources) {
|
|
190
|
+
await this.closeOwnedResources();
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
let e = (await Promise.allSettled([this.conversationRetention?.onModuleDestroy(), this.traceService.onModuleDestroy()].filter((e) => e !== void 0))).filter((e) => e.status === "rejected").map((e) => e.reason);
|
|
194
|
+
if (e.length === 1) throw e[0];
|
|
195
|
+
if (e.length > 1) throw AggregateError(e, "[ai] runtime resources failed to close");
|
|
196
|
+
} finally {
|
|
197
|
+
this.lifecycleState = "closed";
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
async runExclusive(t, i, s, c, u = {}) {
|
|
201
|
+
let f = this.agentScanner.get(t);
|
|
202
|
+
if (!f) throw Error(`[ai] agent 未注册:${t}`);
|
|
203
|
+
let p = d(i), m = this.guardrailService.check(p);
|
|
204
|
+
if (!m.safe) {
|
|
205
|
+
let e = `请求已被安全策略拦截:${m.reason ?? "命中安全规则"}`, t = {
|
|
206
|
+
type: "guardrail",
|
|
207
|
+
content: e,
|
|
208
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
209
|
+
endedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
210
|
+
...m.reason ? { error: m.reason } : {}
|
|
211
|
+
}, n = await this.traceService.createRun(f.name, i);
|
|
212
|
+
return await u.onStart?.(n.runId), await this.traceService.addStep(n.runId, t), await this.traceService.finish(n.runId, e), c?.({
|
|
213
|
+
type: "step",
|
|
214
|
+
step: t
|
|
215
|
+
}), {
|
|
216
|
+
runId: n.runId,
|
|
217
|
+
output: e,
|
|
218
|
+
steps: [t],
|
|
219
|
+
threadId: s
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
await this.conversationRetention?.assertNotExpired(s);
|
|
223
|
+
let { checkpoint: h, archive: g } = await this.checkpointService.loadThreadState(s);
|
|
224
|
+
if (h && h.agentId === "") throw Error(`[ai] thread ${s} is not bound to an Agent; explicit migration is required`);
|
|
225
|
+
if (h && h.agentId !== f.name) throw Error(`[ai] thread ${s} is bound to Agent ${h.agentId}; explicit migration is required`);
|
|
226
|
+
if (!h && g.length > 0) throw Error(`[ai] thread ${s} has unbound archive history; explicit migration is required`);
|
|
227
|
+
if (h?.messages?.length && g.length === 0) throw Error(`[ai] thread ${s} contains legacy messages; explicit migration is required`);
|
|
228
|
+
let _ = h ?? this.checkpointService.createInitialCheckpoint(s, f.name, p), v = u.hardConstraints === void 0 ? _ : {
|
|
229
|
+
..._,
|
|
230
|
+
pinnedContext: {
|
|
231
|
+
..._.pinnedContext,
|
|
232
|
+
hardConstraints: [...u.hardConstraints]
|
|
233
|
+
}
|
|
234
|
+
}, y = this.contextCompactionService.createSession({
|
|
235
|
+
threadId: s,
|
|
236
|
+
agent: f,
|
|
237
|
+
checkpoint: v,
|
|
238
|
+
archive: g,
|
|
239
|
+
currentInput: p
|
|
240
|
+
}), b = await this.traceService.createRun(f.name, i);
|
|
241
|
+
await u.onStart?.(b.runId);
|
|
242
|
+
let x = [], S = c ? new r() : void 0, C = !1, w = c ? (e) => {
|
|
243
|
+
C ? c(e) : S?.push(e);
|
|
244
|
+
} : void 0, T = /* @__PURE__ */ new Map(), E = Promise.resolve(), D = (e) => {
|
|
245
|
+
let t = Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
|
|
246
|
+
return t.startedAt ??= (/* @__PURE__ */ new Date()).toISOString(), t.status !== "running" && (t.endedAt ??= t.startedAt), E = E.then(async () => {
|
|
247
|
+
let n = T.get(e), r = n ?? t;
|
|
248
|
+
n ? (Object.assign(n, t), await this.traceService.updateStep(b.runId, n)) : (T.set(e, r), x.push(r), await this.traceService.addStep(b.runId, r)), w?.({
|
|
249
|
+
type: "step",
|
|
250
|
+
step: structuredClone(r)
|
|
251
|
+
});
|
|
252
|
+
}), E;
|
|
253
|
+
}, O = this.activeParent(), k = { active: !0 };
|
|
254
|
+
return n.run({
|
|
255
|
+
runtimeId: this.runtimeId,
|
|
256
|
+
lease: k,
|
|
257
|
+
runId: b.runId,
|
|
258
|
+
agent: f.name,
|
|
259
|
+
stack: [...O?.stack ?? [], f.name],
|
|
260
|
+
record: D,
|
|
261
|
+
...w ? { emit: w } : {}
|
|
262
|
+
}, async () => {
|
|
263
|
+
try {
|
|
264
|
+
let t = y.initialMessages, n = e(this.configService), r = a([...f.skills ?? [], ...f.tools ?? []], {
|
|
265
|
+
skillScanner: this.skillScanner,
|
|
266
|
+
toolRegistry: this.toolRegistry
|
|
267
|
+
}), i = l({
|
|
268
|
+
planner: this.planner,
|
|
269
|
+
executor: this.executor,
|
|
270
|
+
tools: r,
|
|
271
|
+
maxIterations: n,
|
|
272
|
+
...f.model ? { model: f.model } : {},
|
|
273
|
+
prepareMessages: y.prepareMessages,
|
|
274
|
+
getObservationOptions: (e) => this.toolRegistry.get(e)?.observation ?? {},
|
|
275
|
+
...w ? { onDelta: (e) => w({
|
|
276
|
+
type: "delta",
|
|
277
|
+
content: e
|
|
278
|
+
}) } : {},
|
|
279
|
+
record: D
|
|
280
|
+
}), u = {
|
|
281
|
+
messages: t,
|
|
282
|
+
iteration: 0,
|
|
283
|
+
pendingToolCalls: [],
|
|
284
|
+
observations: [],
|
|
285
|
+
lastContent: "",
|
|
286
|
+
output: "",
|
|
287
|
+
finished: !1
|
|
288
|
+
}, d;
|
|
289
|
+
try {
|
|
290
|
+
if (S) {
|
|
291
|
+
let e = this.runGraphStream(i, u, n, S);
|
|
292
|
+
try {
|
|
293
|
+
for (;;) {
|
|
294
|
+
let t = await e.next();
|
|
295
|
+
if (t.done) {
|
|
296
|
+
d = t.value, C = !0;
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
c?.(t.value);
|
|
300
|
+
}
|
|
301
|
+
} finally {
|
|
302
|
+
C || await e.return(void 0);
|
|
303
|
+
}
|
|
304
|
+
} else d = await i.invoke(u, { recursionLimit: n * 3 + 5 });
|
|
305
|
+
} catch (e) {
|
|
306
|
+
let t = e instanceof Error ? e.message : String(e);
|
|
307
|
+
throw await E, await this.traceService.addStep(b.runId, {
|
|
308
|
+
type: "final",
|
|
309
|
+
content: "Agent run failed",
|
|
310
|
+
error: t
|
|
311
|
+
}), await this.traceService.finish(b.runId, { error: t }), e;
|
|
312
|
+
}
|
|
313
|
+
let m = d.output;
|
|
314
|
+
return o(m) || (m = o(d.lastContent) ? d.lastContent : `达到最大轮次(${n})`, await D({
|
|
315
|
+
type: "final",
|
|
316
|
+
content: m
|
|
317
|
+
})), await this.traceService.finish(b.runId, m), await this.persistTurn(s, y.getCheckpoint(), f.name, p, m, b.runId), {
|
|
318
|
+
runId: b.runId,
|
|
319
|
+
output: m,
|
|
320
|
+
steps: x,
|
|
321
|
+
threadId: s
|
|
322
|
+
};
|
|
323
|
+
} finally {
|
|
324
|
+
k.active = !1;
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
async *runGraphStream(e, t, n, r) {
|
|
329
|
+
let i = t, a, s, c = !1, l, u = !1, d = () => (c = !0, s ? (l ??= s.return(), l) : Promise.resolve()), f = (async () => {
|
|
330
|
+
try {
|
|
331
|
+
let r = await e.stream(t, {
|
|
332
|
+
streamMode: "values",
|
|
333
|
+
recursionLimit: n * 3 + 5
|
|
334
|
+
});
|
|
335
|
+
if (s = r, c) {
|
|
336
|
+
await d();
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
for await (let e of r) i = {
|
|
340
|
+
...e,
|
|
341
|
+
output: o(e.output) ? e.output : i.output
|
|
342
|
+
};
|
|
343
|
+
} catch (e) {
|
|
344
|
+
a = e;
|
|
345
|
+
} finally {
|
|
346
|
+
u = !0, r.close();
|
|
347
|
+
}
|
|
348
|
+
})();
|
|
349
|
+
try {
|
|
350
|
+
for await (let e of r.events()) yield e;
|
|
351
|
+
} finally {
|
|
352
|
+
if (!u) try {
|
|
353
|
+
await d();
|
|
354
|
+
} catch (e) {
|
|
355
|
+
a ??= e;
|
|
356
|
+
}
|
|
357
|
+
await f;
|
|
358
|
+
}
|
|
359
|
+
if (a !== void 0) throw a;
|
|
360
|
+
return i;
|
|
361
|
+
}
|
|
362
|
+
async *runStream(e, t, n, r = {}) {
|
|
363
|
+
let i = [], a, o = !1, s, c, l = () => {
|
|
364
|
+
let e = a;
|
|
365
|
+
a = void 0, e?.();
|
|
366
|
+
}, u = this.run(e, t, n, (e) => {
|
|
367
|
+
i.push(e), l();
|
|
368
|
+
}, r).then((e) => {
|
|
369
|
+
c = e;
|
|
370
|
+
}).catch((e) => {
|
|
371
|
+
s = e;
|
|
372
|
+
}).finally(() => {
|
|
373
|
+
o = !0, l();
|
|
374
|
+
});
|
|
375
|
+
for (; !o || i.length > 0;) {
|
|
376
|
+
if (i.length > 0) {
|
|
377
|
+
yield i.shift();
|
|
378
|
+
continue;
|
|
379
|
+
}
|
|
380
|
+
await new Promise((e) => {
|
|
381
|
+
a = e, (o || i.length > 0) && l();
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
if (await u, s !== void 0) throw s;
|
|
385
|
+
return c;
|
|
386
|
+
}
|
|
387
|
+
async persistTurn(e, t, n, r, i, a) {
|
|
388
|
+
(await this.checkpointService.loadArchive(e, 0)).length === 0 && t?.messages && t.messages.length > 0 && await this.checkpointService.appendArchiveMessages(e, t.messages), await this.checkpointService.appendArchiveMessages(e, [{
|
|
389
|
+
role: "user",
|
|
390
|
+
content: r
|
|
391
|
+
}, {
|
|
392
|
+
role: "assistant",
|
|
393
|
+
content: i,
|
|
394
|
+
traceRefs: [a]
|
|
395
|
+
}]);
|
|
396
|
+
let o = { ...t };
|
|
397
|
+
o.agentId ||= n, o.pinnedContext = {
|
|
398
|
+
...o.pinnedContext,
|
|
399
|
+
initialGoal: o.pinnedContext.initialGoal || r
|
|
400
|
+
}, o.updatedAt = Date.now(), await this.checkpointService.save(o);
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
//#endregion
|
|
404
|
+
export { f as LangGraphOrchestratorService, u as ThreadMigrationConflictError };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { AgentScannerService as e } from "../agent/agent-scanner.service.js";
|
|
2
|
+
import { AiConfigService as t } from "../ai-config.service.js";
|
|
3
|
+
import { provideAiService as n } from "../nest-service-provider.js";
|
|
4
|
+
import { AgentModule as r } from "../agent/agent.module.js";
|
|
5
|
+
import { THREAD_EXECUTION_COORDINATOR as i, resolveThreadExecutionCoordinator as a } from "./thread-execution-coordinator.js";
|
|
6
|
+
import { LangGraphOrchestratorService as o } from "./langgraph/langgraph-orchestrator.service.js";
|
|
7
|
+
import { ToolRegistryService as s } from "../tool/tool-registry.service.js";
|
|
8
|
+
import { TraceService as c } from "../trace/trace.service.js";
|
|
9
|
+
import { GuardrailService as l } from "../guardrail/guardrail.service.js";
|
|
10
|
+
import { GuardrailModule as u } from "../guardrail/guardrail.module.js";
|
|
11
|
+
import { CheckpointService as d } from "../memory/checkpoint.service.js";
|
|
12
|
+
import { THREAD_STATE_STORE as f, TRACE_STORE as p } from "../store/store.interface.js";
|
|
13
|
+
import { StoreModule as m } from "../store/store.module.js";
|
|
14
|
+
import { ThreadService as h } from "../memory/thread.service.js";
|
|
15
|
+
import { MemoryModule as g } from "../memory/memory.module.js";
|
|
16
|
+
import { ConversationRetentionService as _ } from "../retention/conversation-retention.service.js";
|
|
17
|
+
import { SkillScannerService as v } from "../skill/skill-scanner.service.js";
|
|
18
|
+
import { SkillModule as y } from "../skill/skill.module.js";
|
|
19
|
+
import { ExecutorService as b } from "../tool/executor.service.js";
|
|
20
|
+
import { ToolModule as x } from "../tool/tool.module.js";
|
|
21
|
+
import { AiRuntimeStartupValidator as S } from "./ai-runtime-startup.validator.js";
|
|
22
|
+
import { ContextCompactionService as C } from "./internal/context-compaction.service.js";
|
|
23
|
+
import { LangChainPlannerService as w } from "./langchain/langchain-planner.service.js";
|
|
24
|
+
import { Logger as T, Module as E } from "@nestjs/common";
|
|
25
|
+
import D from "@oxc-project/runtime/helpers/decorate";
|
|
26
|
+
//#region app/ai/runtime/runtime.module.ts
|
|
27
|
+
var O = class {};
|
|
28
|
+
O = D([E({
|
|
29
|
+
imports: [
|
|
30
|
+
r,
|
|
31
|
+
y,
|
|
32
|
+
x,
|
|
33
|
+
g,
|
|
34
|
+
u,
|
|
35
|
+
m
|
|
36
|
+
],
|
|
37
|
+
providers: [
|
|
38
|
+
n(w, t),
|
|
39
|
+
n(C, w, d),
|
|
40
|
+
{
|
|
41
|
+
provide: i,
|
|
42
|
+
useFactory: a,
|
|
43
|
+
inject: [t]
|
|
44
|
+
},
|
|
45
|
+
n(S, t, f, i),
|
|
46
|
+
{
|
|
47
|
+
provide: _,
|
|
48
|
+
inject: [
|
|
49
|
+
t,
|
|
50
|
+
f,
|
|
51
|
+
i
|
|
52
|
+
],
|
|
53
|
+
useFactory: (e, t, n) => new _(e, t, n, new T(_.name))
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
provide: c,
|
|
57
|
+
inject: [p, t],
|
|
58
|
+
useFactory: (e, t) => new c(e, t, new T(c.name))
|
|
59
|
+
},
|
|
60
|
+
n(o, w, b, e, v, s, c, l, h, d, t, C, i, _)
|
|
61
|
+
],
|
|
62
|
+
exports: [o, c]
|
|
63
|
+
})], O);
|
|
64
|
+
//#endregion
|
|
65
|
+
export { O as RuntimeModule };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region app/ai/runtime/thread-execution-coordinator.ts
|
|
2
|
+
var e = Symbol("THREAD_EXECUTION_COORDINATOR"), t = /* @__PURE__ */ new Map(), n = class {
|
|
3
|
+
capabilities = Object.freeze({ crossInstanceFifo: !1 });
|
|
4
|
+
async runExclusive(e, n) {
|
|
5
|
+
if (typeof e != "string" || e.trim() === "") throw Error("[ai] thread execution coordinator requires a non-empty threadId");
|
|
6
|
+
let r = t.get(e) ?? Promise.resolve(), i, a = new Promise((e) => {
|
|
7
|
+
i = e;
|
|
8
|
+
});
|
|
9
|
+
t.set(e, a), await r;
|
|
10
|
+
try {
|
|
11
|
+
return await n();
|
|
12
|
+
} finally {
|
|
13
|
+
i(), t.get(e) === a && t.delete(e);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
function r(e) {
|
|
18
|
+
let t = e.get("ai.runtime.threadExecutionCoordinator");
|
|
19
|
+
if (t === void 0) return new n();
|
|
20
|
+
if (typeof t != "object" || !t || Array.isArray(t)) throw Error("[ai] ai.runtime.threadExecutionCoordinator must be an object");
|
|
21
|
+
let r = t;
|
|
22
|
+
if (r.use === void 0) return new n();
|
|
23
|
+
if (typeof r.use != "function") throw Error("[ai] ai.runtime.threadExecutionCoordinator.use must be a class constructor");
|
|
24
|
+
return new r.use(r);
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { n as InProcessThreadExecutionCoordinator, e as THREAD_EXECUTION_COORDINATOR, r as resolveThreadExecutionCoordinator };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { findAiDeclarationFiles as e } from "../declaration-paths.js";
|
|
2
|
+
import { pathToFileURL as t } from "node:url";
|
|
3
|
+
//#region app/ai/skill/skill-scanner.service.ts
|
|
4
|
+
function n(e) {
|
|
5
|
+
if (typeof e != "object" || !e) return !1;
|
|
6
|
+
let t = e;
|
|
7
|
+
return typeof t.name == "string" && t.name.trim() !== "" && t.name.trim() === t.name && typeof t.description == "string" && typeof t.inputSchema == "object" && t.inputSchema !== null && !Array.isArray(t.inputSchema) && typeof t.execute == "function";
|
|
8
|
+
}
|
|
9
|
+
var r = class {
|
|
10
|
+
skills = /* @__PURE__ */ new Map();
|
|
11
|
+
constructor(e) {
|
|
12
|
+
this.configService = e;
|
|
13
|
+
}
|
|
14
|
+
async onModuleInit() {
|
|
15
|
+
await this.scan(), this.logRegisteredSkills();
|
|
16
|
+
}
|
|
17
|
+
get(e) {
|
|
18
|
+
return this.skills.get(e);
|
|
19
|
+
}
|
|
20
|
+
list() {
|
|
21
|
+
return [...this.skills.values()];
|
|
22
|
+
}
|
|
23
|
+
toToolsPayload() {
|
|
24
|
+
return this.list().map((e) => ({
|
|
25
|
+
type: "function",
|
|
26
|
+
function: {
|
|
27
|
+
name: e.name,
|
|
28
|
+
description: e.description,
|
|
29
|
+
parameters: e.inputSchema
|
|
30
|
+
}
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
async scan() {
|
|
34
|
+
for (let e of this.findSkillFiles()) {
|
|
35
|
+
let t = await this.loadSkill(e);
|
|
36
|
+
t && this.register(t);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
findSkillFiles() {
|
|
40
|
+
return e(this.configService, "skill");
|
|
41
|
+
}
|
|
42
|
+
async loadSkill(e) {
|
|
43
|
+
try {
|
|
44
|
+
let r = await import(t(e).href), i = [r?.default, r].find(n);
|
|
45
|
+
if (!i) {
|
|
46
|
+
console.log(`[ai] skill skipped, invalid definition: ${e}`);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
return i;
|
|
50
|
+
} catch (t) {
|
|
51
|
+
let n = t instanceof Error ? t.message : String(t);
|
|
52
|
+
console.log(`[ai] skill skipped, load failed: ${e} - ${n}`);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
register(e) {
|
|
57
|
+
if (!n(e)) throw Error("[ai] invalid Skill definition: name, description, inputSchema and execute are required");
|
|
58
|
+
this.skills.has(e.name) && console.log(`[ai] skill overwritten: ${e.name}`), this.skills.set(e.name, e);
|
|
59
|
+
}
|
|
60
|
+
logRegisteredSkills() {
|
|
61
|
+
let e = [...this.skills.keys()];
|
|
62
|
+
console.log(`[ai] skills registered (${e.length}): ${e.join(", ")}`);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
export { r as SkillScannerService };
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AiConfigService as e } from "../ai-config.service.js";
|
|
2
|
+
import { provideAiService as t } from "../nest-service-provider.js";
|
|
3
|
+
import { SkillScannerService as n } from "./skill-scanner.service.js";
|
|
4
|
+
import { Module as r } from "@nestjs/common";
|
|
5
|
+
import i from "@oxc-project/runtime/helpers/decorate";
|
|
6
|
+
//#region app/ai/skill/skill.module.ts
|
|
7
|
+
var a = class {};
|
|
8
|
+
a = i([r({
|
|
9
|
+
providers: [t(n, e)],
|
|
10
|
+
exports: [n]
|
|
11
|
+
})], a);
|
|
12
|
+
//#endregion
|
|
13
|
+
export { a as SkillModule };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region app/ai/snapshot-data.ts
|
|
2
|
+
function e(t, n = /* @__PURE__ */ new WeakMap()) {
|
|
3
|
+
if (typeof t != "object" || !t) return t;
|
|
4
|
+
if (n.has(t)) return n.get(t);
|
|
5
|
+
if (Array.isArray(t)) {
|
|
6
|
+
let r = [];
|
|
7
|
+
n.set(t, r);
|
|
8
|
+
for (let i of t) r.push(e(i, n));
|
|
9
|
+
return r;
|
|
10
|
+
}
|
|
11
|
+
let r = Object.getPrototypeOf(t);
|
|
12
|
+
if (r !== Object.prototype && r !== null) return t;
|
|
13
|
+
let i = Object.create(r);
|
|
14
|
+
n.set(t, i);
|
|
15
|
+
for (let [r, a] of Object.entries(t)) Object.defineProperty(i, r, {
|
|
16
|
+
value: e(a, n),
|
|
17
|
+
enumerable: !0,
|
|
18
|
+
writable: !0,
|
|
19
|
+
configurable: !0
|
|
20
|
+
});
|
|
21
|
+
return i;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { e as snapshotData };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { randomBytes as e } from "node:crypto";
|
|
2
|
+
//#region app/ai/store/internal/archive-id.ts
|
|
3
|
+
function t() {
|
|
4
|
+
let t = e(16), n = BigInt(Date.now());
|
|
5
|
+
for (let e = 5; e >= 0; --e) t[e] = Number(n & 255n), n >>= 8n;
|
|
6
|
+
t[6] = (t[6] ?? 0) & 15 | 112, t[8] = (t[8] ?? 0) & 63 | 128;
|
|
7
|
+
let r = t.toString("hex");
|
|
8
|
+
return `${r.slice(0, 8)}-${r.slice(8, 12)}-${r.slice(12, 16)}-${r.slice(16, 20)}-${r.slice(20)}`;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as createArchiveMessageId };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { resolveVectorStoreConfig as e } from "./load-store-config.js";
|
|
2
|
+
import { FileVectorStore as t } from "../reference/file-vector.store.js";
|
|
3
|
+
import { QdrantVectorStore as n } from "../reference/qdrant-vector.store.js";
|
|
4
|
+
//#region app/ai/store/internal/create-vector-store.ts
|
|
5
|
+
function r(r) {
|
|
6
|
+
let i = e(r);
|
|
7
|
+
return i.driver === "qdrant" ? new n(i.url, i.collection) : new t(i.path);
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { r as createVectorStore };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as e from "path";
|
|
2
|
+
//#region app/ai/store/internal/load-store-config.ts
|
|
3
|
+
var t = ".template-core/ai/trace", n = ".template-core/ai/vector";
|
|
4
|
+
function r(e) {
|
|
5
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
6
|
+
}
|
|
7
|
+
function i(e) {
|
|
8
|
+
let n = e.get("ai.store.trace"), r = typeof n == "string" && n.trim() !== "" ? n.trim() : t;
|
|
9
|
+
return e.resolvePath(r);
|
|
10
|
+
}
|
|
11
|
+
function a(t) {
|
|
12
|
+
let i = t.get("ai.store.vector"), a = r(i) ? i.path : i, o = typeof a == "string" && a.trim() !== "" ? a.trim() : n, s = t.resolvePath(o);
|
|
13
|
+
return e.extname(s) === ".json" ? s : e.join(s, "index.json");
|
|
14
|
+
}
|
|
15
|
+
function o(e) {
|
|
16
|
+
let t = e.get("ai.store.vector");
|
|
17
|
+
return !r(t) || t.driver !== "qdrant" ? {
|
|
18
|
+
driver: "file",
|
|
19
|
+
path: a(e)
|
|
20
|
+
} : {
|
|
21
|
+
driver: "qdrant",
|
|
22
|
+
url: typeof t.url == "string" && t.url.trim() !== "" ? t.url.trim() : "http://127.0.0.1:6333",
|
|
23
|
+
collection: typeof t.collection == "string" && t.collection.trim() !== "" ? t.collection.trim() : "rubric"
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { t as DEFAULT_TRACE_STORE_PATH, n as DEFAULT_VECTOR_STORE_PATH, i as resolveTraceStorePath, o as resolveVectorStoreConfig, a as resolveVectorStorePath };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { resolveMemoryPath as e } from "../../memory/internal/load-memory-config.js";
|
|
2
|
+
import { FileMemoryStore as t } from "../reference/file-memory.store.js";
|
|
3
|
+
//#region app/ai/store/internal/load-thread-state-store.ts
|
|
4
|
+
function n(e) {
|
|
5
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
6
|
+
}
|
|
7
|
+
function r(r) {
|
|
8
|
+
let i = r.get("ai.store.memory"), a = n(i) ? i : {}, o = {
|
|
9
|
+
...a,
|
|
10
|
+
path: e(r)
|
|
11
|
+
}, s = a.use;
|
|
12
|
+
if (s === void 0) return new t(o.path);
|
|
13
|
+
if (typeof s != "function") throw Error("[ai] ai.store.memory.use must be a class constructor");
|
|
14
|
+
return new s(o);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { r as resolveThreadStateStore };
|