veryfront 0.1.128 → 0.1.129
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/esm/cli/router.d.ts +0 -5
- package/esm/cli/router.d.ts.map +1 -1
- package/esm/cli/router.js +30 -2
- package/esm/cli/shared/update-check.d.ts +4 -0
- package/esm/cli/shared/update-check.d.ts.map +1 -0
- package/esm/cli/shared/update-check.js +97 -0
- package/esm/deno.d.ts +5 -0
- package/esm/deno.js +13 -8
- package/esm/src/channels/control-plane.d.ts.map +1 -1
- package/esm/src/channels/control-plane.js +5 -5
- package/esm/src/channels/invoke.d.ts +1 -1
- package/esm/src/channels/invoke.d.ts.map +1 -1
- package/esm/src/channels/invoke.js +6 -6
- package/esm/src/chat/index.d.ts +12 -24
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +5 -25
- package/esm/src/config/env.d.ts.map +1 -1
- package/esm/src/config/env.js +18 -10
- package/esm/src/data/static-data-fetcher.d.ts +3 -0
- package/esm/src/data/static-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/static-data-fetcher.js +29 -25
- package/esm/src/data/static-paths-fetcher.d.ts.map +1 -1
- package/esm/src/data/static-paths-fetcher.js +3 -2
- package/esm/src/errors/logging.d.ts.map +1 -1
- package/esm/src/errors/logging.js +16 -7
- package/esm/src/errors/user-friendly/error-formatter.d.ts.map +1 -1
- package/esm/src/errors/user-friendly/error-formatter.js +9 -25
- package/esm/src/fs/index.d.ts +11 -12
- package/esm/src/fs/index.d.ts.map +1 -1
- package/esm/src/fs/index.js +11 -24
- package/esm/src/html/dev-scripts.d.ts.map +1 -1
- package/esm/src/html/dev-scripts.js +5 -8
- package/esm/src/html/html-escape.d.ts +1 -0
- package/esm/src/html/html-escape.d.ts.map +1 -1
- package/esm/src/html/html-escape.js +3 -0
- package/esm/src/html/html-injection.js +2 -2
- package/esm/src/html/html-shell-generator.d.ts +5 -2
- package/esm/src/html/html-shell-generator.d.ts.map +1 -1
- package/esm/src/html/html-shell-generator.js +41 -30
- package/esm/src/html/hydration-script-builder/dev-client-renderer.js +2 -2
- package/esm/src/html/hydration-script-builder/dev-component-manifest.js +2 -2
- package/esm/src/html/hydration-script-builder/dev-error-logger.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/dev-error-logger.js +2 -6
- package/esm/src/html/hydration-script-builder/dev-scripts.js +2 -2
- package/esm/src/html/hydration-script-builder/hydration-data-generator.d.ts +3 -1
- package/esm/src/html/hydration-script-builder/hydration-data-generator.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/hydration-data-generator.js +2 -2
- package/esm/src/html/hydration-script-builder/index.d.ts +1 -1
- package/esm/src/html/hydration-script-builder/index.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/index.js +1 -1
- package/esm/src/html/hydration-script-builder/prod-hydration.js +2 -2
- package/esm/src/html/hydration-script-builder/prod-scripts.d.ts +2 -0
- package/esm/src/html/hydration-script-builder/prod-scripts.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/prod-scripts.js +14 -14
- package/esm/src/html/schemas/html.schema.d.ts +2 -0
- package/esm/src/html/schemas/html.schema.d.ts.map +1 -1
- package/esm/src/html/schemas/html.schema.js +2 -0
- package/esm/src/html/styles-builder/css-pregeneration.d.ts +17 -1
- package/esm/src/html/styles-builder/css-pregeneration.d.ts.map +1 -1
- package/esm/src/html/styles-builder/css-pregeneration.js +103 -1
- package/esm/src/html/styles-builder/dev-styles.js +2 -2
- package/esm/src/html/utils.d.ts +2 -0
- package/esm/src/html/utils.d.ts.map +1 -1
- package/esm/src/html/utils.js +49 -28
- package/esm/src/integrations/remote-tools.d.ts.map +1 -1
- package/esm/src/integrations/remote-tools.js +32 -39
- package/esm/src/internal-agents/ag-ui-sse.d.ts +0 -1
- package/esm/src/internal-agents/ag-ui-sse.d.ts.map +1 -1
- package/esm/src/internal-agents/ag-ui-sse.js +2 -16
- package/esm/src/internal-agents/control-plane-auth.d.ts.map +1 -1
- package/esm/src/internal-agents/control-plane-auth.js +5 -3
- package/esm/src/internal-agents/request-body.d.ts.map +1 -1
- package/esm/src/internal-agents/request-body.js +6 -3
- package/esm/src/internal-agents/session-manager.d.ts +1 -0
- package/esm/src/internal-agents/session-manager.d.ts.map +1 -1
- package/esm/src/internal-agents/session-manager.js +12 -18
- package/esm/src/issues/core.d.ts.map +1 -1
- package/esm/src/issues/core.js +24 -23
- package/esm/src/issues/schemas/issue.schema.d.ts.map +1 -1
- package/esm/src/issues/schemas/issue.schema.js +2 -1
- package/esm/src/jobs/runtime-env.d.ts.map +1 -1
- package/esm/src/jobs/runtime-env.js +21 -44
- package/esm/src/markdown/index.d.ts +1 -2
- package/esm/src/markdown/index.d.ts.map +1 -1
- package/esm/src/markdown/index.js +1 -6
- package/esm/src/mcp/server.d.ts +0 -1
- package/esm/src/mcp/server.d.ts.map +1 -1
- package/esm/src/mcp/server.js +40 -41
- package/esm/src/mdx/index.d.ts +3 -2
- package/esm/src/mdx/index.d.ts.map +1 -1
- package/esm/src/mdx/index.js +3 -5
- package/esm/src/middleware/builtin/logger.d.ts.map +1 -1
- package/esm/src/middleware/builtin/logger.js +31 -28
- package/esm/src/middleware/builtin/security/rate-limit.d.ts.map +1 -1
- package/esm/src/middleware/builtin/security/rate-limit.js +17 -12
- package/esm/src/middleware/builtin/timeout.d.ts.map +1 -1
- package/esm/src/middleware/builtin/timeout.js +17 -10
- package/esm/src/modules/import-map/default-import-map.d.ts.map +1 -1
- package/esm/src/modules/import-map/default-import-map.js +4 -3
- package/esm/src/oauth/handlers/callback-handler.d.ts +0 -5
- package/esm/src/oauth/handlers/callback-handler.d.ts.map +1 -1
- package/esm/src/oauth/handlers/callback-handler.js +9 -14
- package/esm/src/oauth/handlers/index.d.ts +1 -1
- package/esm/src/oauth/handlers/index.js +1 -1
- package/esm/src/oauth/handlers/init-handler.d.ts.map +1 -1
- package/esm/src/oauth/handlers/init-handler.js +32 -20
- package/esm/src/oauth/providers/index.d.ts +1 -1
- package/esm/src/oauth/providers/index.js +1 -1
- package/esm/src/oauth/schemas/index.d.ts +1 -1
- package/esm/src/oauth/schemas/index.js +1 -1
- package/esm/src/oauth/token-store/index.d.ts +1 -1
- package/esm/src/oauth/token-store/index.js +1 -1
- package/esm/src/oauth/token-store/memory.d.ts +1 -1
- package/esm/src/oauth/token-store/memory.d.ts.map +1 -1
- package/esm/src/oauth/token-store/memory.js +8 -8
- package/esm/src/observability/request-profiler.d.ts +31 -0
- package/esm/src/observability/request-profiler.d.ts.map +1 -0
- package/esm/src/observability/request-profiler.js +94 -0
- package/esm/src/observability/tracing/otlp-setup.d.ts.map +1 -1
- package/esm/src/observability/tracing/otlp-setup.js +16 -21
- package/esm/src/prompt/factory.d.ts.map +1 -1
- package/esm/src/prompt/factory.js +10 -12
- package/esm/src/prompt/registry.d.ts.map +1 -1
- package/esm/src/prompt/registry.js +12 -10
- package/esm/src/prompt/schemas/prompt.schema.d.ts.map +1 -1
- package/esm/src/prompt/schemas/prompt.schema.js +0 -2
- package/esm/src/prompt/types.d.ts +1 -1
- package/esm/src/prompt/types.d.ts.map +1 -1
- package/esm/src/provider/local/ai-sdk-adapter.d.ts.map +1 -1
- package/esm/src/provider/local/ai-sdk-adapter.js +3 -8
- package/esm/src/provider/local/env.d.ts +4 -6
- package/esm/src/provider/local/env.d.ts.map +1 -1
- package/esm/src/provider/local/env.js +14 -1
- package/esm/src/provider/local/local-engine.d.ts.map +1 -1
- package/esm/src/provider/local/local-engine.js +2 -7
- package/esm/src/provider/model-registry.d.ts.map +1 -1
- package/esm/src/provider/model-registry.js +2 -7
- package/esm/src/provider/veryfront-cloud/provider.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/provider.js +1 -7
- package/esm/src/provider/veryfront-cloud/shared.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/shared.js +9 -11
- package/esm/src/proxy/handler.d.ts.map +1 -1
- package/esm/src/proxy/handler.js +56 -57
- package/esm/src/react/compat/hooks-adapter.d.ts +1 -7
- package/esm/src/react/compat/hooks-adapter.d.ts.map +1 -1
- package/esm/src/react/compat/hooks-adapter.js +35 -40
- package/esm/src/react/components/Head.d.ts +1 -26
- package/esm/src/react/components/Head.d.ts.map +1 -1
- package/esm/src/react/components/Head.js +1 -172
- package/esm/src/react/context/index.d.ts +2 -46
- package/esm/src/react/context/index.d.ts.map +1 -1
- package/esm/src/react/context/index.js +1 -44
- package/esm/src/react/head-collector.d.ts +1 -10
- package/esm/src/react/head-collector.d.ts.map +1 -1
- package/esm/src/react/head-collector.js +4 -0
- package/esm/src/react/router/index.d.ts +2 -45
- package/esm/src/react/router/index.d.ts.map +1 -1
- package/esm/src/react/router/index.js +1 -49
- package/esm/src/react/runtime/core.d.ts +49 -0
- package/esm/src/react/runtime/core.d.ts.map +1 -0
- package/esm/src/react/runtime/core.js +200 -0
- package/esm/src/rendering/orchestrator/html.d.ts +2 -0
- package/esm/src/rendering/orchestrator/html.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/html.js +69 -12
- package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/ssr-orchestrator.js +4 -0
- package/esm/src/rendering/orchestrator/types.d.ts +4 -0
- package/esm/src/rendering/orchestrator/types.d.ts.map +1 -1
- package/esm/src/repositories/types.d.ts.map +1 -1
- package/esm/src/resource/factory.d.ts.map +1 -1
- package/esm/src/resource/factory.js +12 -9
- package/esm/src/resource/registry.d.ts +3 -3
- package/esm/src/resource/registry.d.ts.map +1 -1
- package/esm/src/resource/registry.js +7 -7
- package/esm/src/schemas/common.d.ts.map +1 -1
- package/esm/src/schemas/common.js +7 -4
- package/esm/src/security/http/config.d.ts +0 -1
- package/esm/src/security/http/config.d.ts.map +1 -1
- package/esm/src/security/http/config.js +3 -16
- package/esm/src/security/http/response/security-handler.d.ts +1 -0
- package/esm/src/security/http/response/security-handler.d.ts.map +1 -1
- package/esm/src/security/http/response/security-handler.js +17 -12
- package/esm/src/security/index.d.ts +4 -2
- package/esm/src/security/index.d.ts.map +1 -1
- package/esm/src/security/index.js +3 -1
- package/esm/src/server/handlers/dev/styles-css.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/styles-css.handler.js +8 -7
- package/esm/src/server/handlers/monitoring/metrics.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/monitoring/metrics.handler.js +3 -1
- package/esm/src/server/handlers/request/module/module-server-handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/module/module-server-handler.js +18 -15
- package/esm/src/server/handlers/request/prod-hydration-module.handler.d.ts +8 -0
- package/esm/src/server/handlers/request/prod-hydration-module.handler.d.ts.map +1 -0
- package/esm/src/server/handlers/request/prod-hydration-module.handler.js +41 -0
- package/esm/src/server/handlers/request/ssr/ssr.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/ssr/ssr.handler.js +3 -0
- package/esm/src/server/production-server.d.ts.map +1 -1
- package/esm/src/server/production-server.js +65 -0
- package/esm/src/server/runtime-handler/handler-context-builder.d.ts +1 -1
- package/esm/src/server/runtime-handler/handler-context-builder.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.d.ts +1 -1
- package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.js +36 -11
- package/esm/src/server/runtime-handler/request-utils.d.ts +7 -0
- package/esm/src/server/runtime-handler/request-utils.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/request-utils.js +10 -0
- package/esm/src/server/services/rendering/ssr.service.d.ts +1 -0
- package/esm/src/server/services/rendering/ssr.service.d.ts.map +1 -1
- package/esm/src/server/services/rendering/ssr.service.js +12 -5
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +1 -1
- package/esm/src/skill/allowed-tools.d.ts +3 -8
- package/esm/src/skill/allowed-tools.d.ts.map +1 -1
- package/esm/src/skill/executor.js +2 -2
- package/esm/src/skill/parser.d.ts.map +1 -1
- package/esm/src/skill/parser.js +12 -12
- package/esm/src/skill/path-safety.js +1 -1
- package/esm/src/skill/tools.d.ts.map +1 -1
- package/esm/src/skill/tools.js +18 -11
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts.map +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.js +1 -1
- package/esm/src/task/discovery.d.ts.map +1 -1
- package/esm/src/task/discovery.js +73 -95
- package/esm/src/tool/executor.d.ts.map +1 -1
- package/esm/src/tool/executor.js +8 -7
- package/esm/src/tool/factory.d.ts.map +1 -1
- package/esm/src/tool/factory.js +13 -16
- package/esm/src/transforms/esm/package-registry.d.ts +4 -0
- package/esm/src/transforms/esm/package-registry.d.ts.map +1 -1
- package/esm/src/transforms/esm/package-registry.js +34 -17
- package/esm/src/transforms/import-rewriter/strategies/veryfront-strategy.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/strategies/veryfront-strategy.js +2 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.js +26 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.js +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/render-sessions.d.ts +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/render-sessions.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/render-sessions.js +3 -0
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/index.d.ts +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/index.js +1 -1
- package/esm/src/transforms/veryfront-module-urls.d.ts.map +1 -1
- package/esm/src/transforms/veryfront-module-urls.js +7 -3
- package/esm/src/types/entities/getEntityInfo.d.ts.map +1 -1
- package/esm/src/types/entities/getEntityInfo.js +79 -127
- package/esm/src/utils/path-utils.d.ts +1 -1
- package/esm/src/utils/path-utils.d.ts.map +1 -1
- package/esm/src/utils/path-utils.js +16 -7
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/utils/version.d.ts.map +1 -1
- package/esm/src/utils/version.js +0 -1
- package/esm/src/workflow/worker/dynamic-job-entrypoint.d.ts.map +1 -1
- package/esm/src/workflow/worker/dynamic-job-entrypoint.js +5 -72
- package/esm/src/workflow/worker/job-entrypoint.d.ts.map +1 -1
- package/esm/src/workflow/worker/job-entrypoint.js +5 -72
- package/esm/src/workflow/worker/shared.d.ts +18 -0
- package/esm/src/workflow/worker/shared.d.ts.map +1 -0
- package/esm/src/workflow/worker/shared.js +77 -0
- package/package.json +1 -1
- package/src/cli/router.ts +41 -2
- package/src/cli/shared/update-check.ts +110 -0
- package/src/deno.js +13 -8
- package/src/src/channels/control-plane.ts +6 -10
- package/src/src/channels/invoke.ts +7 -7
- package/src/src/chat/index.ts +96 -132
- package/src/src/config/env.ts +24 -11
- package/src/src/data/static-data-fetcher.ts +59 -34
- package/src/src/data/static-paths-fetcher.ts +4 -2
- package/src/src/errors/logging.ts +21 -7
- package/src/src/errors/user-friendly/error-formatter.ts +14 -29
- package/src/src/fs/index.ts +21 -30
- package/src/src/html/dev-scripts.ts +5 -9
- package/src/src/html/html-escape.ts +4 -0
- package/src/src/html/html-injection.ts +2 -2
- package/src/src/html/html-shell-generator.ts +60 -26
- package/src/src/html/hydration-script-builder/dev-client-renderer.ts +2 -2
- package/src/src/html/hydration-script-builder/dev-component-manifest.ts +2 -2
- package/src/src/html/hydration-script-builder/dev-error-logger.ts +2 -8
- package/src/src/html/hydration-script-builder/dev-scripts.ts +2 -2
- package/src/src/html/hydration-script-builder/hydration-data-generator.ts +2 -1
- package/src/src/html/hydration-script-builder/index.ts +5 -1
- package/src/src/html/hydration-script-builder/prod-hydration.ts +2 -2
- package/src/src/html/hydration-script-builder/prod-scripts.ts +16 -15
- package/src/src/html/schemas/html.schema.ts +2 -0
- package/src/src/html/styles-builder/css-pregeneration.ts +133 -1
- package/src/src/html/styles-builder/dev-styles.ts +2 -2
- package/src/src/html/utils.ts +62 -29
- package/src/src/integrations/remote-tools.ts +39 -37
- package/src/src/internal-agents/ag-ui-sse.ts +2 -17
- package/src/src/internal-agents/control-plane-auth.ts +8 -6
- package/src/src/internal-agents/request-body.ts +7 -5
- package/src/src/internal-agents/session-manager.ts +16 -20
- package/src/src/issues/core.ts +24 -27
- package/src/src/issues/schemas/issue.schema.ts +3 -1
- package/src/src/jobs/runtime-env.ts +24 -50
- package/src/src/markdown/index.ts +5 -8
- package/src/src/mcp/server.ts +50 -53
- package/src/src/mdx/index.ts +7 -8
- package/src/src/middleware/builtin/logger.ts +44 -29
- package/src/src/middleware/builtin/security/rate-limit.ts +20 -11
- package/src/src/middleware/builtin/timeout.ts +22 -13
- package/src/src/modules/import-map/default-import-map.ts +4 -3
- package/src/src/oauth/handlers/callback-handler.ts +9 -16
- package/src/src/oauth/handlers/index.ts +1 -1
- package/src/src/oauth/handlers/init-handler.ts +56 -27
- package/src/src/oauth/providers/index.ts +1 -1
- package/src/src/oauth/schemas/index.ts +1 -1
- package/src/src/oauth/token-store/index.ts +1 -1
- package/src/src/oauth/token-store/memory.ts +8 -8
- package/src/src/observability/request-profiler.ts +140 -0
- package/src/src/observability/tracing/otlp-setup.ts +16 -22
- package/src/src/prompt/factory.ts +16 -14
- package/src/src/prompt/registry.ts +14 -13
- package/src/src/prompt/schemas/prompt.schema.ts +0 -4
- package/src/src/prompt/types.ts +1 -2
- package/src/src/provider/local/ai-sdk-adapter.ts +3 -10
- package/src/src/provider/local/env.ts +22 -2
- package/src/src/provider/local/local-engine.ts +2 -9
- package/src/src/provider/model-registry.ts +2 -9
- package/src/src/provider/veryfront-cloud/provider.ts +1 -8
- package/src/src/provider/veryfront-cloud/shared.ts +12 -15
- package/src/src/proxy/handler.ts +90 -74
- package/src/src/react/compat/hooks-adapter.ts +43 -44
- package/src/src/react/components/Head.tsx +1 -181
- package/src/src/react/context/index.tsx +2 -83
- package/src/src/react/head-collector.ts +9 -0
- package/src/src/react/router/index.tsx +2 -100
- package/src/src/react/runtime/core.ts +303 -0
- package/src/src/rendering/orchestrator/html.ts +122 -18
- package/src/src/rendering/orchestrator/ssr-orchestrator.ts +8 -0
- package/src/src/rendering/orchestrator/types.ts +4 -0
- package/src/src/repositories/types.ts +0 -4
- package/src/src/resource/factory.ts +15 -11
- package/src/src/resource/registry.ts +7 -7
- package/src/src/schemas/common.ts +8 -5
- package/src/src/security/http/config.ts +3 -19
- package/src/src/security/http/response/security-handler.ts +22 -13
- package/src/src/security/index.ts +4 -7
- package/src/src/server/handlers/dev/styles-css.handler.ts +32 -14
- package/src/src/server/handlers/monitoring/metrics.handler.ts +3 -1
- package/src/src/server/handlers/request/module/module-server-handler.ts +24 -17
- package/src/src/server/handlers/request/prod-hydration-module.handler.ts +61 -0
- package/src/src/server/handlers/request/ssr/ssr.handler.ts +3 -0
- package/src/src/server/production-server.ts +84 -0
- package/src/src/server/runtime-handler/handler-context-builder.ts +1 -1
- package/src/src/server/runtime-handler/index.ts +44 -13
- package/src/src/server/runtime-handler/request-utils.ts +11 -0
- package/src/src/server/services/rendering/ssr.service.ts +31 -18
- package/src/src/server/services/rsc/endpoints/rsc-bundles.generated.ts +1 -1
- package/src/src/skill/allowed-tools.ts +1 -8
- package/src/src/skill/executor.ts +2 -2
- package/src/src/skill/parser.ts +13 -20
- package/src/src/skill/path-safety.ts +1 -1
- package/src/src/skill/tools.ts +27 -20
- package/src/src/studio/bridge/bridge-bundle.generated.ts +1 -1
- package/src/src/task/discovery.ts +97 -97
- package/src/src/tool/executor.ts +10 -8
- package/src/src/tool/factory.ts +21 -22
- package/src/src/tool/types.ts +0 -17
- package/src/src/transforms/esm/package-registry.ts +52 -20
- package/src/src/transforms/import-rewriter/strategies/veryfront-strategy.ts +2 -1
- package/src/src/transforms/mdx/esm-module-loader/cache-format.ts +34 -1
- package/src/src/transforms/mdx/esm-module-loader/module-fetcher/index.ts +1 -1
- package/src/src/transforms/mdx/esm-module-loader/module-fetcher/render-sessions.ts +4 -0
- package/src/src/transforms/pipeline/stages/ssr-vf-modules/index.ts +1 -1
- package/src/src/transforms/veryfront-module-urls.ts +6 -2
- package/src/src/types/entities/getEntityInfo.ts +131 -152
- package/src/src/utils/path-utils.ts +16 -7
- package/src/src/utils/version-constant.ts +1 -1
- package/src/src/utils/version.ts +0 -1
- package/src/src/workflow/worker/dynamic-job-entrypoint.ts +18 -84
- package/src/src/workflow/worker/job-entrypoint.ts +18 -85
- package/src/src/workflow/worker/shared.ts +127 -0
- package/esm/src/prompt/schemas/index.d.ts +0 -7
- package/esm/src/prompt/schemas/index.d.ts.map +0 -1
- package/esm/src/prompt/schemas/index.js +0 -6
- package/esm/src/security/http/handlers-index.d.ts +0 -5
- package/esm/src/security/http/handlers-index.d.ts.map +0 -1
- package/esm/src/security/http/handlers-index.js +0 -3
- package/src/src/prompt/schemas/index.ts +0 -7
- package/src/src/security/http/handlers-index.ts +0 -4
package/esm/cli/router.d.ts
CHANGED
package/esm/cli/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/cli/router.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/cli/router.ts"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAiEpD;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA0FlE"}
|
package/esm/cli/router.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module cli/router
|
|
5
5
|
*/
|
|
6
|
+
import * as dntShim from "../_dnt.shims.js";
|
|
6
7
|
import { cliErrorBoundary } from "../src/errors/index.js";
|
|
7
8
|
import { cliLogger, VERSION } from "./utils/index.js";
|
|
8
9
|
import { handleAnalyzeChunksCommand } from "./commands/analyze-chunks/handler.js";
|
|
@@ -43,7 +44,7 @@ import { parseLoginMethod } from "./auth/utils.js";
|
|
|
43
44
|
import { showCommandHelp, showMainHelp } from "./help/index.js";
|
|
44
45
|
import { setColorOverride } from "./ui/colors.js";
|
|
45
46
|
import { exitProcess, setQuietMode, setVerboseMode } from "./utils/index.js";
|
|
46
|
-
import { setJsonMode, setOutputPath } from "./shared/json-output.js";
|
|
47
|
+
import { createSuccessEnvelope, isJsonMode, outputJson, setJsonMode, setOutputPath, } from "./shared/json-output.js";
|
|
47
48
|
import { detectCI, setNonInteractive } from "./shared/interactive.js";
|
|
48
49
|
/**
|
|
49
50
|
* Command registry mapping command names to their handlers.
|
|
@@ -129,21 +130,43 @@ export async function routeCommand(args) {
|
|
|
129
130
|
setOutputPath(args.o);
|
|
130
131
|
if (args.yes || args.y || detectCI())
|
|
131
132
|
setNonInteractive(true);
|
|
133
|
+
// Start update check early so the network request runs during command execution
|
|
134
|
+
const updateCheck = import("./shared/update-check.js")
|
|
135
|
+
.then(({ checkForUpdates }) => checkForUpdates(VERSION))
|
|
136
|
+
.catch(() => { });
|
|
132
137
|
if (args.version || args.v) {
|
|
138
|
+
if (isJsonMode()) {
|
|
139
|
+
await outputJson(createSuccessEnvelope("version", {
|
|
140
|
+
version: VERSION,
|
|
141
|
+
deno: dntShim.Deno.version.deno,
|
|
142
|
+
v8: dntShim.Deno.version.v8,
|
|
143
|
+
typescript: dntShim.Deno.version.typescript,
|
|
144
|
+
os: dntShim.Deno.build.os,
|
|
145
|
+
arch: dntShim.Deno.build.arch,
|
|
146
|
+
standalone: dntShim.Deno.build.standalone ?? false,
|
|
147
|
+
}));
|
|
148
|
+
exitProcess(0);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
133
151
|
cliLogger.info(`Veryfront CLI v${VERSION}`);
|
|
152
|
+
if (args.verbose) {
|
|
153
|
+
cliLogger.info(`Deno ${dntShim.Deno.version.deno} (V8 ${dntShim.Deno.version.v8}, TypeScript ${dntShim.Deno.version.typescript})`);
|
|
154
|
+
cliLogger.info(`OS: ${dntShim.Deno.build.os} ${dntShim.Deno.build.arch}`);
|
|
155
|
+
}
|
|
156
|
+
await updateCheck;
|
|
134
157
|
exitProcess(0);
|
|
135
158
|
return;
|
|
136
159
|
}
|
|
137
160
|
const command = args._[0];
|
|
138
161
|
if (args.help || args.h) {
|
|
139
162
|
showHelp(command);
|
|
163
|
+
await updateCheck;
|
|
140
164
|
exitProcess(0);
|
|
141
165
|
return;
|
|
142
166
|
}
|
|
143
167
|
await cliErrorBoundary(async () => {
|
|
144
168
|
if (command === "help") {
|
|
145
169
|
showHelp();
|
|
146
|
-
exitProcess(0);
|
|
147
170
|
return;
|
|
148
171
|
}
|
|
149
172
|
const handler = command ? commands[command] : undefined;
|
|
@@ -169,4 +192,9 @@ export async function routeCommand(args) {
|
|
|
169
192
|
}
|
|
170
193
|
await (handler ?? handleStartCommand)(args);
|
|
171
194
|
});
|
|
195
|
+
// Wait for update check to finish (with timeout to avoid hanging)
|
|
196
|
+
await Promise.race([
|
|
197
|
+
updateCheck,
|
|
198
|
+
new Promise((r) => dntShim.setTimeout(r, 5000)),
|
|
199
|
+
]);
|
|
172
200
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-check.d.ts","sourceRoot":"","sources":["../../../src/cli/shared/update-check.ts"],"names":[],"mappings":"AAmCA,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAQxE;AAED,wBAAgB,UAAU,IAAI,OAAO,CAMpC;AAOD,wBAAsB,eAAe,CACnC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,CAiDf"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Non-blocking update check
|
|
3
|
+
*
|
|
4
|
+
* Checks for newer CLI versions after command execution.
|
|
5
|
+
* Cached for 24 hours. Never blocks command output.
|
|
6
|
+
*
|
|
7
|
+
* @module cli/shared/update-check
|
|
8
|
+
*/
|
|
9
|
+
import * as dntShim from "../../_dnt.shims.js";
|
|
10
|
+
import { getEnv } from "../../src/platform/index.js";
|
|
11
|
+
import { createFileSystem } from "../../src/platform/index.js";
|
|
12
|
+
import { join } from "../../src/platform/compat/path/index.js";
|
|
13
|
+
import { getEnvironmentConfig } from "../../src/config/index.js";
|
|
14
|
+
import { isJsonMode } from "./json-output.js";
|
|
15
|
+
import { isQuiet } from "../utils/index.js";
|
|
16
|
+
import { detectCI } from "./interactive.js";
|
|
17
|
+
const CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000;
|
|
18
|
+
const REGISTRY_URL = "https://jsr.io/@veryfront/veryfront/meta.json";
|
|
19
|
+
const INSTALL_CMD = "deno install -gArf jsr:@veryfront/veryfront";
|
|
20
|
+
function getCacheFile() {
|
|
21
|
+
const env = getEnvironmentConfig();
|
|
22
|
+
if (!env.homeDir)
|
|
23
|
+
return null;
|
|
24
|
+
const cacheDir = join(env.homeDir, ".cache", "veryfront");
|
|
25
|
+
return join(cacheDir, "update-check.json");
|
|
26
|
+
}
|
|
27
|
+
export function compareVersions(current, latest) {
|
|
28
|
+
const c = current.split(".").map(Number);
|
|
29
|
+
const l = latest.split(".").map(Number);
|
|
30
|
+
for (let i = 0; i < 3; i++) {
|
|
31
|
+
if ((l[i] ?? 0) > (c[i] ?? 0))
|
|
32
|
+
return true;
|
|
33
|
+
if ((l[i] ?? 0) < (c[i] ?? 0))
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
export function shouldSkip() {
|
|
39
|
+
if (getEnv("VERYFRONT_NO_UPDATE_CHECK") === "1")
|
|
40
|
+
return true;
|
|
41
|
+
if (detectCI())
|
|
42
|
+
return true;
|
|
43
|
+
if (isJsonMode())
|
|
44
|
+
return true;
|
|
45
|
+
if (isQuiet())
|
|
46
|
+
return true;
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
function printUpdateNotice(current, latest) {
|
|
50
|
+
console.error(`\n Update available: ${current} → ${latest}`);
|
|
51
|
+
console.error(` Run: ${INSTALL_CMD}\n`);
|
|
52
|
+
}
|
|
53
|
+
export async function checkForUpdates(currentVersion) {
|
|
54
|
+
if (shouldSkip())
|
|
55
|
+
return;
|
|
56
|
+
const cacheFile = getCacheFile();
|
|
57
|
+
if (!cacheFile)
|
|
58
|
+
return;
|
|
59
|
+
const fs = createFileSystem();
|
|
60
|
+
try {
|
|
61
|
+
const raw = await fs.readTextFile(cacheFile);
|
|
62
|
+
const cache = JSON.parse(raw);
|
|
63
|
+
if (Date.now() - cache.lastCheck < CHECK_INTERVAL_MS) {
|
|
64
|
+
if (cache.latestVersion &&
|
|
65
|
+
compareVersions(currentVersion, cache.latestVersion)) {
|
|
66
|
+
printUpdateNotice(currentVersion, cache.latestVersion);
|
|
67
|
+
}
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
// No cache — proceed
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
const resp = await dntShim.fetch(REGISTRY_URL);
|
|
76
|
+
if (!resp.ok) {
|
|
77
|
+
await resp.body?.cancel();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const data = await resp.json();
|
|
81
|
+
const latestVersion = data.latest;
|
|
82
|
+
if (!latestVersion)
|
|
83
|
+
return;
|
|
84
|
+
const env = getEnvironmentConfig();
|
|
85
|
+
if (!env.homeDir)
|
|
86
|
+
return;
|
|
87
|
+
const cacheDir = join(env.homeDir, ".cache", "veryfront");
|
|
88
|
+
await fs.mkdir(cacheDir, { recursive: true });
|
|
89
|
+
await fs.writeTextFile(cacheFile, JSON.stringify({ lastCheck: Date.now(), latestVersion }));
|
|
90
|
+
if (compareVersions(currentVersion, latestVersion)) {
|
|
91
|
+
printUpdateNotice(currentVersion, latestVersion);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
// Network error — silently ignore
|
|
96
|
+
}
|
|
97
|
+
}
|
package/esm/deno.d.ts
CHANGED
|
@@ -337,6 +337,11 @@ declare namespace _default {
|
|
|
337
337
|
"test:e2e:rsc-browser": string;
|
|
338
338
|
"test:e2e:binary": string;
|
|
339
339
|
"test:e2e:binary:fresh": string;
|
|
340
|
+
"bench:browser": string;
|
|
341
|
+
"bench:server": string;
|
|
342
|
+
"bench:compare:local": string;
|
|
343
|
+
"perf:bench": string;
|
|
344
|
+
"perf:loop": string;
|
|
340
345
|
"check:circular": string;
|
|
341
346
|
cli: string;
|
|
342
347
|
mcp: string;
|
package/esm/deno.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.129",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"exclude": [
|
|
@@ -45,18 +45,18 @@ export default {
|
|
|
45
45
|
"./cli": "./cli/main.ts"
|
|
46
46
|
},
|
|
47
47
|
"imports": {
|
|
48
|
-
"veryfront/head": "./src/react/
|
|
49
|
-
"veryfront/router": "./src/react/
|
|
50
|
-
"veryfront/context": "./src/react/
|
|
48
|
+
"veryfront/head": "./src/react/runtime/core.ts",
|
|
49
|
+
"veryfront/router": "./src/react/runtime/core.ts",
|
|
50
|
+
"veryfront/context": "./src/react/runtime/core.ts",
|
|
51
51
|
"veryfront/fonts": "./src/react/fonts/index.ts",
|
|
52
52
|
"veryfront/chat": "./src/chat/index.ts",
|
|
53
53
|
"veryfront/markdown": "./src/markdown/index.ts",
|
|
54
54
|
"veryfront/mdx": "./src/mdx/index.ts",
|
|
55
55
|
"veryfront/fs": "./src/fs/index.ts",
|
|
56
56
|
"veryfront/platform": "./src/platform/index.ts",
|
|
57
|
-
"veryfront/react/head": "./src/react/
|
|
58
|
-
"veryfront/react/router": "./src/react/
|
|
59
|
-
"veryfront/react/context": "./src/react/
|
|
57
|
+
"veryfront/react/head": "./src/react/runtime/core.ts",
|
|
58
|
+
"veryfront/react/router": "./src/react/runtime/core.ts",
|
|
59
|
+
"veryfront/react/context": "./src/react/runtime/core.ts",
|
|
60
60
|
"veryfront/react/fonts": "./src/react/fonts/index.ts",
|
|
61
61
|
"veryfront/react/components/ai": "./src/react/components/ai/index.ts",
|
|
62
62
|
"veryfront/components/ai": "./src/react/components/ai/index.ts",
|
|
@@ -351,10 +351,15 @@ export default {
|
|
|
351
351
|
"test:bun": "node ./tests/bun/run-tests.mjs src/",
|
|
352
352
|
"test:all-runtimes": "deno task test:unit && deno task test:node && deno task test:bun",
|
|
353
353
|
"test:e2e": "deno task test:e2e:playwright",
|
|
354
|
-
"test:e2e:playwright": "npx playwright test --config=tests/e2e/playwright.config.
|
|
354
|
+
"test:e2e:playwright": "PW_DISABLE_TS_ESM=1 npx playwright test --config=tests/e2e/playwright.config.cjs",
|
|
355
355
|
"test:e2e:rsc-browser": "deno task generate && VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --allow-all tests/e2e/regressions/rsc-proxy-hydration.test.ts --unstable-worker-options --unstable-net",
|
|
356
356
|
"test:e2e:binary": "deno task generate && deno test --allow-all tests/integration/compiled-binary-e2e.test.ts",
|
|
357
357
|
"test:e2e:binary:fresh": "deno task generate && VERYFRONT_BINARY_FRESH=1 deno test --allow-all tests/integration/compiled-binary-e2e.test.ts",
|
|
358
|
+
"bench:browser": "deno run -A benchmarks/browser/run.ts",
|
|
359
|
+
"bench:server": "deno run -A benchmarks/server/run.ts",
|
|
360
|
+
"bench:compare:local": "deno run -A benchmarks/compare/local.ts",
|
|
361
|
+
"perf:bench": "deno run -A benchmarks/perf-bench.ts",
|
|
362
|
+
"perf:loop": "deno run -A benchmarks/perf-loop.ts",
|
|
358
363
|
"check:circular": "deno run -A jsr:@cunarist/deno-circular-deps src/index.ts",
|
|
359
364
|
"cli": "deno run --allow-all cli/main.ts",
|
|
360
365
|
"mcp": "deno run --allow-all cli/main.ts mcp",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-plane.d.ts","sourceRoot":"","sources":["../../../src/src/channels/control-plane.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,yBAAyB;;;;;EAA+C,CAAC;AAEtF,eAAO,MAAM,mCAAmC;;;;;;;;;iBAI9C,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;iBAMlC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;iBAO7B,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;iBAEzC,CAAC;AAEH,QAAA,MAAM,oBAAoB;;;;;;;;;iBASxB,CAAC;AAEH,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;iBAS5B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAChG,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,c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EAAE,mBAAmB,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB,GACA,OAAO,CAAC,kBAAkB,CAAC,CAmB7B"}
|
|
@@ -64,6 +64,9 @@ function toArrayBuffer(bytes) {
|
|
|
64
64
|
new Uint8Array(buffer).set(bytes);
|
|
65
65
|
return buffer;
|
|
66
66
|
}
|
|
67
|
+
function parseCompactJwsPart(encodedPart) {
|
|
68
|
+
return JSON.parse(new TextDecoder().decode(base64urlDecodeToBytes(encodedPart)));
|
|
69
|
+
}
|
|
67
70
|
function pemToDer(pem, label) {
|
|
68
71
|
const body = pem
|
|
69
72
|
.replace(`-----BEGIN ${label}-----`, "")
|
|
@@ -89,11 +92,8 @@ async function verifySignedRequestJws(jws, body, options) {
|
|
|
89
92
|
if (!encodedHeader || !encodedPayload || !encodedSignature) {
|
|
90
93
|
throw new Error("Control-plane signature must include header, payload, and signature");
|
|
91
94
|
}
|
|
92
|
-
|
|
93
|
-
const claims = options.claimsSchema.parse(
|
|
94
|
-
if (header.alg !== "EdDSA") {
|
|
95
|
-
throw new Error("Unsupported control-plane JWS algorithm");
|
|
96
|
-
}
|
|
95
|
+
compactJwsHeaderSchema.parse(parseCompactJwsPart(encodedHeader));
|
|
96
|
+
const claims = options.claimsSchema.parse(parseCompactJwsPart(encodedPayload));
|
|
97
97
|
const signingInput = new TextEncoder().encode(`${encodedHeader}.${encodedPayload}`);
|
|
98
98
|
const signature = base64urlDecodeToBytes(encodedSignature);
|
|
99
99
|
const publicKey = await importEd25519PublicKey(options.publicKeyPem);
|
|
@@ -141,7 +141,7 @@ export declare const defaultChannelInvokeDeps: ChannelInvokeDeps;
|
|
|
141
141
|
export declare function listChannelAssistants(ctx: HandlerContext, deps: ChannelInvokeDeps): Promise<ChannelAssistantsResponse>;
|
|
142
142
|
export { verifyDispatchJws } from "./control-plane.js";
|
|
143
143
|
export declare function normalizeConversationHistoryForRuntime(messages: ChannelInvokeRequest["conversationHistory"]): Message[];
|
|
144
|
-
export declare function resolveChannelInvokeAgent(assistantId: string, deps: Pick<ChannelInvokeDeps, "getAgent"
|
|
144
|
+
export declare function resolveChannelInvokeAgent(assistantId: string, deps: Pick<ChannelInvokeDeps, "getAgent">): Agent | undefined;
|
|
145
145
|
export declare function buildChannelResponseParts(response: AgentResponse): ChannelResponsePart[];
|
|
146
146
|
export declare function executeChannelInvoke(payload: ChannelInvokeRequest, ctx: HandlerContext, deps: ChannelInvokeDeps): Promise<ChannelInvokeResponse>;
|
|
147
147
|
//# sourceMappingURL=invoke.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoke.d.ts","sourceRoot":"","sources":["../../../src/src/channels/invoke.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,IAAI,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAqB,KAAK,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AA4CvF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAiC,CAAC;AAEzE,eAAO,MAAM,8BAA8B;;;;iBAIzC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;iBAE1C,CAAC;AAiCH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;2BAMpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYtC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAA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;AAgBD,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,oBAAoB,EAC7B,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,qBAAqB,CAAC,CAkEhC"}
|
|
@@ -158,7 +158,7 @@ export function normalizeConversationHistoryForRuntime(messages) {
|
|
|
158
158
|
export function resolveChannelInvokeAgent(assistantId, deps) {
|
|
159
159
|
return deps.getAgent(assistantId);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function toChannelToolCallState(status) {
|
|
162
162
|
switch (status) {
|
|
163
163
|
case "completed":
|
|
164
164
|
return "completed";
|
|
@@ -215,7 +215,7 @@ export function buildChannelResponseParts(response) {
|
|
|
215
215
|
id: toolCall.id,
|
|
216
216
|
name: toolCall.name,
|
|
217
217
|
input: toolCall.args,
|
|
218
|
-
state:
|
|
218
|
+
state: toChannelToolCallState(toolCall.status),
|
|
219
219
|
}));
|
|
220
220
|
if (toolCall.status === "completed" || toolCall.status === "error") {
|
|
221
221
|
responseParts.push(channelToolResultPartSchema.parse({
|
|
@@ -245,7 +245,7 @@ export function buildChannelResponseParts(response) {
|
|
|
245
245
|
}
|
|
246
246
|
return responseParts;
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function classifyChannelInvokeError(error) {
|
|
249
249
|
const veryfrontError = fromError(error);
|
|
250
250
|
if (veryfrontError?.type === "no_ai_available") {
|
|
251
251
|
return { code: "provider_error", retryable: false };
|
|
@@ -273,11 +273,11 @@ export async function executeChannelInvoke(payload, ctx, deps) {
|
|
|
273
273
|
},
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
const
|
|
276
|
+
const normalizedHistory = normalizeConversationHistoryForRuntime(payload.conversationHistory);
|
|
277
277
|
await agent.clearMemory();
|
|
278
278
|
try {
|
|
279
279
|
const result = await agent.generate({
|
|
280
|
-
input:
|
|
280
|
+
input: normalizedHistory,
|
|
281
281
|
context: {
|
|
282
282
|
requestId: payload.dispatchId,
|
|
283
283
|
dispatchId: payload.dispatchId,
|
|
@@ -314,7 +314,7 @@ export async function executeChannelInvoke(payload, ctx, deps) {
|
|
|
314
314
|
});
|
|
315
315
|
return {
|
|
316
316
|
ignored: false,
|
|
317
|
-
error:
|
|
317
|
+
error: classifyChannelInvokeError(error),
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
320
|
}
|
package/esm/src/chat/index.d.ts
CHANGED
|
@@ -48,29 +48,17 @@
|
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
50
|
import "../../_dnt.polyfills.js";
|
|
51
|
-
export { Chat, ChatComponents } from "../react/components/ai/chat.js";
|
|
52
|
-
export type
|
|
53
|
-
export {
|
|
54
|
-
export type
|
|
55
|
-
export {
|
|
56
|
-
export
|
|
57
|
-
export {
|
|
58
|
-
export type { AttachmentInfo, AttachmentPillProps, BranchPickerProps, ChatSidebarProps, ChatTab, ChatWithSidebarAttachmentConfig, ChatWithSidebarChatController, ChatWithSidebarFeatureConfig, ChatWithSidebarGroupedProps, ChatWithSidebarMessageConfig, ChatWithSidebarModelConfig, ChatWithSidebarProps, ChatWithSidebarQuickActionsConfig, ChatWithSidebarSidebarConfig, ChatWithSidebarTabsConfig, ChatWithSidebarVoiceConfig, CodeBlockProps, ConversationEmptyStateProps, ConversationScrollButtonProps, DropZoneOverlayProps, FeedbackValue, InferenceBadgeProps, InlineCitationProps, MessageActionsProps, MessageEditFormProps, MessageFeedbackProps, ModelOption, ModelSelectorProps, PartGroup, QuickAction, QuickActionsProps, SkillBadgeProps, Source, SourcesProps, StepIndicatorProps, SuggestionProps, SuggestionsProps, TabSwitcherProps, Thread, UpgradeCTAProps, UploadedFile, UploadsPanelProps, UseThreadsOptions, UseThreadsResult, } from "../react/components/ai/chat.js";
|
|
59
|
-
export { Message as StandaloneMessage, StreamingMessage, } from "../react/components/ai/message.js";
|
|
60
|
-
export type { MessageProps, StreamingMessageProps, } from "../react/components/ai/message.js";
|
|
61
|
-
export { AgentCard } from "../react/components/ai/agent-card.js";
|
|
62
|
-
export type { AgentCardProps } from "../react/components/ai/agent-card.js";
|
|
63
|
-
export { AIErrorBoundary, useAIErrorHandler, } from "../react/components/ai/error-boundary.js";
|
|
64
|
-
export type { AIErrorBoundaryProps } from "../react/components/ai/error-boundary.js";
|
|
51
|
+
export { Chat, ChatComponents, type ChatProps } from "../react/components/ai/chat.js";
|
|
52
|
+
export { ChatComposer, type ChatComposerProps, ChatEmpty, type ChatEmptyProps, ChatIf, type ChatIfProps, ChatMessageList, type ChatMessageListProps, ChatRoot, type ChatRootProps, ErrorBanner, type ErrorBannerProps, Message, type MessageRootProps, ModelAvatar, type ModelAvatarProps, } from "../react/components/ai/chat.js";
|
|
53
|
+
export { ChatContextProvider, type ChatContextValue, ComposerContextProvider, type ComposerContextValue, MessageContextProvider, type MessageContextValue, ThreadListContextProvider, type ThreadListContextValue, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, useThreadListContext, useThreadListContextOptional, } from "../react/components/ai/chat.js";
|
|
54
|
+
export { type AttachmentInfo, AttachmentPill, type AttachmentPillProps, BranchPicker, type BranchPickerProps, ChatSidebar, type ChatSidebarProps, type ChatTab, ChatWithSidebar, type ChatWithSidebarAttachmentConfig, type ChatWithSidebarChatController, type ChatWithSidebarFeatureConfig, type ChatWithSidebarGroupedProps, type ChatWithSidebarMessageConfig, type ChatWithSidebarModelConfig, type ChatWithSidebarProps, type ChatWithSidebarQuickActionsConfig, type ChatWithSidebarSidebarConfig, type ChatWithSidebarTabsConfig, type ChatWithSidebarVoiceConfig, type CodeBlockProps, ConversationEmptyState, type ConversationEmptyStateProps, ConversationScrollButton, type ConversationScrollButtonProps, downloadMarkdown, DropZoneOverlay, type DropZoneOverlayProps, exportAsMarkdown, extractSourcesFromParts, FadeIn, type FeedbackValue, getTextContent, groupPartsInOrder, InferenceBadge, type InferenceBadgeProps, InlineCitation, type InlineCitationProps, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActions, type MessageActionsProps, MessageEditForm, type MessageEditFormProps, MessageFeedback, type MessageFeedbackProps, type ModelOption, ModelSelector, type ModelSelectorProps, type PartGroup, type QuickAction, QuickActions, type QuickActionsProps, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, type SkillBadgeProps, type Source, Sources, type SourcesProps, StepIndicator, type StepIndicatorProps, Suggestion, type SuggestionProps, Suggestions, type SuggestionsProps, TabSwitcher, type TabSwitcherProps, type Thread, ToolCallCard, ToolStatusBadge, UpgradeCTA, type UpgradeCTAProps, type UploadedFile, UploadsPanel, type UploadsPanelProps, useThreads, type UseThreadsOptions, type UseThreadsResult, } from "../react/components/ai/chat.js";
|
|
55
|
+
export { Message as StandaloneMessage, type MessageProps, StreamingMessage, type StreamingMessageProps, } from "../react/components/ai/message.js";
|
|
56
|
+
export { AgentCard, type AgentCardProps } from "../react/components/ai/agent-card.js";
|
|
57
|
+
export { AIErrorBoundary, type AIErrorBoundaryProps, useAIErrorHandler, } from "../react/components/ai/error-boundary.js";
|
|
65
58
|
export type { AgentTheme, ChatTheme } from "../react/components/ai/theme.js";
|
|
66
|
-
export { useChat } from "../agent/react/use-chat/index.js";
|
|
67
|
-
export
|
|
68
|
-
export {
|
|
69
|
-
export type
|
|
70
|
-
export {
|
|
71
|
-
export type { UseCompletionOptions, UseCompletionResult, } from "../agent/react/use-completion.js";
|
|
72
|
-
export { useStreaming } from "../agent/react/use-streaming.js";
|
|
73
|
-
export type { UseStreamingOptions, UseStreamingResult, } from "../agent/react/use-streaming.js";
|
|
74
|
-
export { useVoiceInput } from "../agent/react/use-voice-input.js";
|
|
75
|
-
export type { UseVoiceInputOptions, UseVoiceInputResult, } from "../agent/react/use-voice-input.js";
|
|
59
|
+
export { type BranchInfo, type BrowserInferenceStatus, type DynamicToolUIPart, type InferenceMode, type OnToolCallArg, type ReasoningUIPart, type StepUIPart, type TextUIPart, type ToolOutput, type ToolResultUIPart, type ToolState, type ToolUIPart, type UIMessage, type UIMessagePart, useChat, type UseChatOptions, type UseChatResult, } from "../agent/react/use-chat/index.js";
|
|
60
|
+
export { useAgent, type UseAgentOptions, type UseAgentResult, } from "../agent/react/use-agent.js";
|
|
61
|
+
export { useCompletion, type UseCompletionOptions, type UseCompletionResult, } from "../agent/react/use-completion.js";
|
|
62
|
+
export { useStreaming, type UseStreamingOptions, type UseStreamingResult, } from "../agent/react/use-streaming.js";
|
|
63
|
+
export { useVoiceInput, type UseVoiceInputOptions, type UseVoiceInputResult, } from "../agent/react/use-voice-input.js";
|
|
76
64
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAEtF,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,SAAS,EACT,KAAK,cAAc,EACnB,MAAM,EACN,KAAK,WAAW,EAChB,eAAe,EACf,KAAK,oBAAoB,EACzB,QAAQ,EACR,KAAK,aAAa,EAClB,WAAW,EACX,KAAK,gBAAgB,EACrB,OAAO,EACP,KAAK,gBAAgB,EACrB,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,cAAc,EAC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BAAmB,GACzB,MAAM,mCAAmC,CAAC"}
|
package/esm/src/chat/index.js
CHANGED
|
@@ -47,36 +47,16 @@
|
|
|
47
47
|
* </Message.Root>
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
// veryfront/chat — Chat UI components + hooks
|
|
51
|
-
//
|
|
52
|
-
// Merges components/ai (UI) and agent/react (hooks) into a single
|
|
53
|
-
// product-oriented import path.
|
|
54
|
-
// ---------------------------------------------------------------------------
|
|
55
|
-
// Core preset + compound
|
|
56
|
-
// ---------------------------------------------------------------------------
|
|
57
50
|
import "../../_dnt.polyfills.js";
|
|
58
51
|
export { Chat, ChatComponents } from "../react/components/ai/chat.js";
|
|
59
|
-
// ---------------------------------------------------------------------------
|
|
60
|
-
// Composition building blocks
|
|
61
|
-
// ---------------------------------------------------------------------------
|
|
62
52
|
export { ChatComposer, ChatEmpty, ChatIf, ChatMessageList, ChatRoot, ErrorBanner, Message, ModelAvatar, } from "../react/components/ai/chat.js";
|
|
63
|
-
// ---------------------------------------------------------------------------
|
|
64
|
-
// Contexts
|
|
65
|
-
// ---------------------------------------------------------------------------
|
|
66
53
|
export { ChatContextProvider, ComposerContextProvider, MessageContextProvider, ThreadListContextProvider, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, useThreadListContext, useThreadListContextOptional, } from "../react/components/ai/chat.js";
|
|
67
|
-
// ---------------------------------------------------------------------------
|
|
68
|
-
// Sub-components
|
|
69
|
-
// ---------------------------------------------------------------------------
|
|
70
54
|
export { AttachmentPill, BranchPicker, ChatSidebar, ChatWithSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActions, MessageEditForm, MessageFeedback, ModelSelector, QuickActions, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolCallCard, ToolStatusBadge, UpgradeCTA, UploadsPanel, useThreads, } from "../react/components/ai/chat.js";
|
|
71
|
-
// Message (standalone bubble, not the chat compound)
|
|
72
55
|
export { Message as StandaloneMessage, StreamingMessage, } from "../react/components/ai/message.js";
|
|
73
56
|
export { AgentCard } from "../react/components/ai/agent-card.js";
|
|
74
57
|
export { AIErrorBoundary, useAIErrorHandler, } from "../react/components/ai/error-boundary.js";
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
export {
|
|
79
|
-
export {
|
|
80
|
-
export { useCompletion } from "../agent/react/use-completion.js";
|
|
81
|
-
export { useStreaming } from "../agent/react/use-streaming.js";
|
|
82
|
-
export { useVoiceInput } from "../agent/react/use-voice-input.js";
|
|
58
|
+
export { useChat, } from "../agent/react/use-chat/index.js";
|
|
59
|
+
export { useAgent, } from "../agent/react/use-agent.js";
|
|
60
|
+
export { useCompletion, } from "../agent/react/use-completion.js";
|
|
61
|
+
export { useStreaming, } from "../agent/react/use-streaming.js";
|
|
62
|
+
export { useVoiceInput, } from "../agent/react/use-voice-input.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/src/config/env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/src/config/env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,yBAAyB,CAAC;AAqBvF,wBAAgB,wBAAwB,CAAC,GAAG,GAAE,iBAA0C,GAAG,OAAO,CAEjG;AAED,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,iBAA0C,GAAG,MAAM,CAExF;AAED,wBAAgB,gCAAgC,CAC9C,YAAY,SAAI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GAAE,iBAA0C,GAC9C,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,wBAAwB,CAAC,GAAG,GAAE,iBAA0C,GAAG,OAAO,CAEjG;AAED,wBAAgB,mBAAmB,CACjC,GAAG,GAAE,iBAA0C,GAC9C,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,qBAAqB,CACnC,GAAG,GAAE,iBAA0C,GAC9C,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,iBAA0C,GAAG;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAUA;AAED,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,iBAA0C,GAAG;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAOA"}
|
package/esm/src/config/env.js
CHANGED
|
@@ -12,6 +12,18 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { getEnvironmentConfig } from "./environment-config.js";
|
|
14
14
|
import { getEnv } from "../platform/compat/process.js";
|
|
15
|
+
function toEnabledFlag(enabled, truthyValue) {
|
|
16
|
+
return enabled ? truthyValue : undefined;
|
|
17
|
+
}
|
|
18
|
+
function toCliBooleanFlag(enabled) {
|
|
19
|
+
return toEnabledFlag(enabled, "1");
|
|
20
|
+
}
|
|
21
|
+
function getBaseOtelConfig(env) {
|
|
22
|
+
return {
|
|
23
|
+
veryfrontFlag: toCliBooleanFlag(env.otelEnabled),
|
|
24
|
+
endpoint: env.otelEndpoint,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
15
27
|
export function getDisableLruIntervalEnv(env = getEnvironmentConfig()) {
|
|
16
28
|
return env.disableLruInterval;
|
|
17
29
|
}
|
|
@@ -69,10 +81,10 @@ export function isDenoTestingEnv(env = getEnvironmentConfig()) {
|
|
|
69
81
|
return env.denoTesting;
|
|
70
82
|
}
|
|
71
83
|
export function getNoColorEnv(env = getEnvironmentConfig()) {
|
|
72
|
-
return env.noColor
|
|
84
|
+
return toCliBooleanFlag(env.noColor);
|
|
73
85
|
}
|
|
74
86
|
export function getForceColorEnv(env = getEnvironmentConfig()) {
|
|
75
|
-
return env.forceColor
|
|
87
|
+
return toCliBooleanFlag(env.forceColor);
|
|
76
88
|
}
|
|
77
89
|
export function isRscExperimentalEnabled(env = getEnvironmentConfig()) {
|
|
78
90
|
return env.experimentalRsc;
|
|
@@ -84,13 +96,10 @@ export function getEnvironmentFromEnv(env = getEnvironmentConfig()) {
|
|
|
84
96
|
return env.veryfrontEnv || env.nodeEnv;
|
|
85
97
|
}
|
|
86
98
|
export function getOtelTracingConfig(env = getEnvironmentConfig()) {
|
|
87
|
-
const enabledFlag = env.otelEnabled ? "true" : undefined;
|
|
88
|
-
const veryfrontFlag = env.otelEnabled ? "1" : undefined;
|
|
89
99
|
return {
|
|
90
|
-
enabledFlag,
|
|
91
|
-
|
|
100
|
+
enabledFlag: toEnabledFlag(env.otelEnabled, "true"),
|
|
101
|
+
...getBaseOtelConfig(env),
|
|
92
102
|
serviceName: env.otelServiceName,
|
|
93
|
-
endpoint: env.otelEndpoint,
|
|
94
103
|
tracesEndpoint: env.otelTracesEndpoint,
|
|
95
104
|
exporter: env.otelTracesExporter,
|
|
96
105
|
headers: env.otelHeaders,
|
|
@@ -99,9 +108,8 @@ export function getOtelTracingConfig(env = getEnvironmentConfig()) {
|
|
|
99
108
|
}
|
|
100
109
|
export function getOtelMetricsConfig(env = getEnvironmentConfig()) {
|
|
101
110
|
return {
|
|
102
|
-
enabledFlag: env.otelMetricsEnabled
|
|
103
|
-
|
|
104
|
-
endpoint: env.otelEndpoint,
|
|
111
|
+
enabledFlag: toCliBooleanFlag(env.otelMetricsEnabled),
|
|
112
|
+
...getBaseOtelConfig(env),
|
|
105
113
|
metricsEndpoint: env.otelMetricsEndpoint,
|
|
106
114
|
exporter: env.otelMetricsExporter,
|
|
107
115
|
};
|
|
@@ -5,6 +5,9 @@ export declare class StaticDataFetcher {
|
|
|
5
5
|
private pendingRevalidations;
|
|
6
6
|
constructor(cacheManager: CacheManager);
|
|
7
7
|
fetch(pageModule: PageWithData, context: DataContext): Promise<DataResult>;
|
|
8
|
+
private createStaticDataContext;
|
|
9
|
+
private executeStaticData;
|
|
10
|
+
private storeCacheEntry;
|
|
8
11
|
private fetchFreshNoCache;
|
|
9
12
|
private fetchFresh;
|
|
10
13
|
private revalidateInBackground;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static-data-fetcher.d.ts","sourceRoot":"","sources":["../../../src/src/data/static-data-fetcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"static-data-fetcher.d.ts","sourceRoot":"","sources":["../../../src/src/data/static-data-fetcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAsDxE,qBAAa,iBAAiB;IAGhB,OAAO,CAAC,YAAY;IAFhC,OAAO,CAAC,oBAAoB,CAAoC;gBAE5C,YAAY,EAAE,YAAY;IAExC,KAAK,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IA4ChF,OAAO,CAAC,uBAAuB;IAM/B,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,eAAe;YAQT,iBAAiB;YA+BjB,UAAU;YAqEV,sBAAsB;IAoEpC;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;CAIjB"}
|