diff --git a/eslint.config.js b/eslint.config.js index 5f677ac58..b6b3504da 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -49,6 +49,19 @@ export default defineConfig( "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/no-explicit-any": "off", "react/react-in-jsx-scope": "off", + // `disallowTypeAnnotations` must stay off: inline `import()` types are how + // optional peer dependencies are typed here (e.g. `typeof import("pg")`) + // without forcing a static import that would break consumers who have not + // installed the package. Turning it on flags those deliberate annotations, + // and they are not autofixable. + "@typescript-eslint/consistent-type-imports": [ + "error", + { + prefer: "type-imports", + fixStyle: "separate-type-imports", + disallowTypeAnnotations: false, + }, + ], }, }, { diff --git a/examples/cli/src/run-interactive.ts b/examples/cli/src/run-interactive.ts index 56408eb45..baf2871a4 100644 --- a/examples/cli/src/run-interactive.ts +++ b/examples/cli/src/run-interactive.ts @@ -4,8 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { ITask, IWorkflow, TaskGraphRunConfig, WorkflowRunConfig } from "@workglow/task-graph"; -import { IRunConfig, TaskGraph } from "@workglow/task-graph"; +import type { + IRunConfig, + ITask, + IWorkflow, + TaskGraphRunConfig, + WorkflowRunConfig, +} from "@workglow/task-graph"; +import { TaskGraph } from "@workglow/task-graph"; import { detectCliTheme, setCliTheme } from "./terminal/detectTerminalTheme"; import { renderTaskInstanceRun, renderWorkflowRun } from "./ui/render"; diff --git a/examples/cli/src/test/samples.test.ts b/examples/cli/src/test/samples.test.ts index e7b374b98..48c181326 100644 --- a/examples/cli/src/test/samples.test.ts +++ b/examples/cli/src/test/samples.test.ts @@ -6,11 +6,11 @@ import { registerAiTasks } from "@workglow/ai"; import { InMemoryTabularStorage } from "@workglow/storage"; +import type { Task } from "@workglow/task-graph"; import { computeGraphInputSchema, createGraphFromGraphJSON, registerBaseTasks, - Task, TaskGraph, TaskGraphPrimaryKeyNames, TaskGraphSchema, diff --git a/examples/cli/src/ui/render.ts b/examples/cli/src/ui/render.ts index a3629cc1c..70dad6205 100644 --- a/examples/cli/src/ui/render.ts +++ b/examples/cli/src/ui/render.ts @@ -5,7 +5,7 @@ */ import type { IRunConfig, ITask, ITaskConstructor, TaskGraph } from "@workglow/task-graph"; -import { InputTaskConfig } from "@workglow/tasks"; +import type { InputTaskConfig } from "@workglow/tasks"; import { render } from "ink"; import React from "react"; import type { PromptFieldDescriptor } from "../input/prompt"; diff --git a/examples/web/src/App.tsx b/examples/web/src/App.tsx index 9929da063..e1202ab32 100644 --- a/examples/web/src/App.tsx +++ b/examples/web/src/App.tsx @@ -6,11 +6,11 @@ import { registerAiTasks } from "@workglow/ai"; import { registerHuggingFaceTransformers } from "@workglow/huggingface-transformers/ai"; +import type { JsonTaskItem } from "@workglow/task-graph"; import { CACHE_REGISTRY, DefaultCacheRegistry, getTaskQueueRegistry, - JsonTaskItem, registerBaseTasks, TaskGraph, Workflow, diff --git a/examples/web/src/components/TaskDataButtons.tsx b/examples/web/src/components/TaskDataButtons.tsx index 006a6b54c..9655e339d 100644 --- a/examples/web/src/components/TaskDataButtons.tsx +++ b/examples/web/src/components/TaskDataButtons.tsx @@ -1,4 +1,5 @@ -import { ITask, TaskStatus } from "@workglow/task-graph"; +import type { ITask } from "@workglow/task-graph"; +import { TaskStatus } from "@workglow/task-graph"; import { ViewportPortal } from "@xyflow/react"; import React, { useState } from "react"; import { DataDialog } from "./DataDialog"; diff --git a/examples/web/src/dependencyJson.ts b/examples/web/src/dependencyJson.ts index c2f8b9f08..e7c700699 100644 --- a/examples/web/src/dependencyJson.ts +++ b/examples/web/src/dependencyJson.ts @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { createGraphFromDependencyJSON, JsonTaskItem, TaskGraph } from "@workglow/task-graph"; +import type { JsonTaskItem, TaskGraph } from "@workglow/task-graph"; +import { createGraphFromDependencyJSON } from "@workglow/task-graph"; /** True if any task item (including nested subtasks) is a synthetic boundary task. */ export function dependencyJsonHasBoundaryTasks(items: JsonTaskItem[]): boolean { diff --git a/examples/web/src/graph/DataflowEdge.tsx b/examples/web/src/graph/DataflowEdge.tsx index 19e1d7d37..30d934664 100644 --- a/examples/web/src/graph/DataflowEdge.tsx +++ b/examples/web/src/graph/DataflowEdge.tsx @@ -4,8 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Dataflow, TaskStatus } from "@workglow/task-graph"; -import { BaseEdge, Edge, EdgeLabelRenderer, EdgeProps, getBezierPath } from "@xyflow/react"; +import type { Dataflow } from "@workglow/task-graph"; +import { TaskStatus } from "@workglow/task-graph"; +import type { Edge, EdgeProps } from "@xyflow/react"; +import { BaseEdge, EdgeLabelRenderer, getBezierPath } from "@xyflow/react"; import { useEffect, useMemo, useState } from "react"; import { DataDialog } from "../components/DataDialog"; import { getStatusColorBg } from "./util"; diff --git a/examples/web/src/graph/NodeContainer.tsx b/examples/web/src/graph/NodeContainer.tsx index d54d0d9f3..a4b2a8056 100644 --- a/examples/web/src/graph/NodeContainer.tsx +++ b/examples/web/src/graph/NodeContainer.tsx @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TaskStatus } from "@workglow/task-graph"; +import type { TaskStatus } from "@workglow/task-graph"; import { Handle, Position } from "@xyflow/react"; import React from "react"; diff --git a/examples/web/src/graph/NodeHeader.tsx b/examples/web/src/graph/NodeHeader.tsx index b9b1d0c6c..86f79ed64 100644 --- a/examples/web/src/graph/NodeHeader.tsx +++ b/examples/web/src/graph/NodeHeader.tsx @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TaskStatus } from "@workglow/task-graph"; +import type { TaskStatus } from "@workglow/task-graph"; import React from "react"; import { getStatusColorBg } from "./util"; diff --git a/examples/web/src/graph/NodeTaskProps.ts b/examples/web/src/graph/NodeTaskProps.ts index c90f934de..37a74845e 100644 --- a/examples/web/src/graph/NodeTaskProps.ts +++ b/examples/web/src/graph/NodeTaskProps.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ITask, TaskStatus } from "@workglow/task-graph"; +import type { ITask, TaskStatus } from "@workglow/task-graph"; // Common props for all node types export interface NodeTaskProps { diff --git a/examples/web/src/graph/RunGraphFlow.tsx b/examples/web/src/graph/RunGraphFlow.tsx index c50dafa4d..e26b87c22 100644 --- a/examples/web/src/graph/RunGraphFlow.tsx +++ b/examples/web/src/graph/RunGraphFlow.tsx @@ -4,22 +4,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Dataflow, TaskGraph, TaskGraphEvents } from "@workglow/task-graph"; -import { - Controls, - Edge, - EdgeTypes, - Node, - NodeTypes, - ReactFlow, - useEdgesState, - useNodesState, - useReactFlow, -} from "@xyflow/react"; -import React, { Dispatch, SetStateAction, useCallback, useEffect, useRef } from "react"; +import type { Dataflow, TaskGraph, TaskGraphEvents } from "@workglow/task-graph"; +import type { Edge, EdgeTypes, Node, NodeTypes } from "@xyflow/react"; +import { Controls, ReactFlow, useEdgesState, useNodesState, useReactFlow } from "@xyflow/react"; +import type { Dispatch, SetStateAction } from "react"; +import React, { useCallback, useEffect, useRef } from "react"; import { computeLayout, GraphPipelineCenteredLayout, GraphPipelineLayout } from "../layout"; -import { DataflowEdge, DataflowEdgeData } from "./DataflowEdge"; -import { TaskNode, TaskNodeData } from "./TaskNode"; +import type { DataflowEdgeData } from "./DataflowEdge"; +import { DataflowEdge } from "./DataflowEdge"; +import type { TaskNodeData } from "./TaskNode"; +import { TaskNode } from "./TaskNode"; import { updateNode } from "./util"; import "@xyflow/react/dist/base.css"; diff --git a/examples/web/src/graph/TaskNode.tsx b/examples/web/src/graph/TaskNode.tsx index 9bab2bb83..54ad4f278 100644 --- a/examples/web/src/graph/TaskNode.tsx +++ b/examples/web/src/graph/TaskNode.tsx @@ -4,9 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ITask, TaskStatus, type StreamEvent } from "@workglow/task-graph"; +import type { ITask, StreamEvent } from "@workglow/task-graph"; +import { TaskStatus } from "@workglow/task-graph"; import { ArrayTask } from "@workglow/tasks"; -import { Node, NodeProps } from "@xyflow/react"; +import type { Node, NodeProps } from "@xyflow/react"; import { useEffect, useRef, useState } from "react"; import { FiCloud, FiCloudLightning } from "react-icons/fi"; import { ProgressBar } from "../components/ProgressBar"; diff --git a/examples/web/src/graph/util.ts b/examples/web/src/graph/util.ts index 4f417a49a..7030eea3f 100644 --- a/examples/web/src/graph/util.ts +++ b/examples/web/src/graph/util.ts @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ITask, TaskStatus } from "@workglow/task-graph"; +import type { ITask } from "@workglow/task-graph"; +import { TaskStatus } from "@workglow/task-graph"; export const getStatusColorBg = (status: TaskStatus): string => { switch (status) { diff --git a/examples/web/src/layout.ts b/examples/web/src/layout.ts index 984903dd0..f68066614 100644 --- a/examples/web/src/layout.ts +++ b/examples/web/src/layout.ts @@ -5,7 +5,7 @@ */ import { DirectedAcyclicGraph } from "@workglow/util/graph"; -import { Edge, Node } from "@xyflow/react"; +import type { Edge, Node } from "@xyflow/react"; type PositionXY = { x: number; diff --git a/examples/web/src/status/GraphStoreStatus.tsx b/examples/web/src/status/GraphStoreStatus.tsx index de70aa83e..91b48bd26 100644 --- a/examples/web/src/status/GraphStoreStatus.tsx +++ b/examples/web/src/status/GraphStoreStatus.tsx @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TaskGraphRepository } from "@workglow/task-graph"; +import type { TaskGraphRepository } from "@workglow/task-graph"; import { useCallback } from "react"; export function GraphStoreStatus({ repository }: { repository: TaskGraphRepository }) { diff --git a/examples/web/src/status/OutputRepositoryStatus.tsx b/examples/web/src/status/OutputRepositoryStatus.tsx index 87c02164e..a16113d31 100644 --- a/examples/web/src/status/OutputRepositoryStatus.tsx +++ b/examples/web/src/status/OutputRepositoryStatus.tsx @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TaskOutputRepository } from "@workglow/task-graph"; +import type { TaskOutputRepository } from "@workglow/task-graph"; import { useCallback, useEffect, useState } from "react"; export function OutputRepositoryStatus({ diff --git a/packages/ai/src/job/AiJob.ts b/packages/ai/src/job/AiJob.ts index 6cf22fcf3..4e7b47205 100644 --- a/packages/ai/src/job/AiJob.ts +++ b/packages/ai/src/job/AiJob.ts @@ -4,15 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { IJobExecuteContext } from "@workglow/job-queue"; import { AbortSignalJobError, - IJobExecuteContext, Job, PermanentJobError, RetryableJobError, withJobErrorDiagnostics, } from "@workglow/job-queue"; -import { TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { TaskInput, TaskOutput } from "@workglow/task-graph"; import type { JsonSchema } from "@workglow/util/schema"; import type { AiEmit } from "../capability/AiEmit"; import type { Capability } from "../capability/Capabilities"; diff --git a/packages/ai/src/model/ModelRegistry.ts b/packages/ai/src/model/ModelRegistry.ts index bf236adea..92183fcc4 100644 --- a/packages/ai/src/model/ModelRegistry.ts +++ b/packages/ai/src/model/ModelRegistry.ts @@ -4,15 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { ServiceRegistry } from "@workglow/util"; import { createServiceToken, globalServiceRegistry, registerInputCompactor, registerInputResolver, - ServiceRegistry, } from "@workglow/util"; import { InMemoryModelRepository } from "./InMemoryModelRepository"; -import { ModelRepository } from "./ModelRepository"; +import type { ModelRepository } from "./ModelRepository"; import type { ModelConfig } from "./ModelSchema"; export const MODEL_REPOSITORY = createServiceToken("model.repository"); diff --git a/packages/ai/src/model/ModelRepository.ts b/packages/ai/src/model/ModelRepository.ts index f8ee11f7f..41366afc8 100644 --- a/packages/ai/src/model/ModelRepository.ts +++ b/packages/ai/src/model/ModelRepository.ts @@ -4,12 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ITabularStorage } from "@workglow/storage"; -import { EventEmitter, EventParameters } from "@workglow/util"; +import type { ITabularStorage } from "@workglow/storage"; +import type { EventParameters } from "@workglow/util"; +import { EventEmitter } from "@workglow/util"; import type { DataPortSchemaObject, SchemaNode } from "@workglow/util/schema"; import { compileSchema } from "@workglow/util/schema"; -import { ModelPrimaryKeyNames, ModelRecord, ModelRecordSchema } from "./ModelSchema"; +import type { ModelPrimaryKeyNames, ModelRecord } from "./ModelSchema"; +import { ModelRecordSchema } from "./ModelSchema"; export type ModelEventListeners = { model_added: (model: ModelRecord) => void; diff --git a/packages/ai/src/model/ModelSchema.ts b/packages/ai/src/model/ModelSchema.ts index 5b07d5964..b2cb8c463 100644 --- a/packages/ai/src/model/ModelSchema.ts +++ b/packages/ai/src/model/ModelSchema.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { DataPortSchemaObject } from "@workglow/util/worker"; +import type { DataPortSchemaObject } from "@workglow/util/worker"; /** * A model configuration suitable for task/job inputs. diff --git a/packages/ai/src/provider/AiProviderRegistry.ts b/packages/ai/src/provider/AiProviderRegistry.ts index 8785e4a6e..807016957 100644 --- a/packages/ai/src/provider/AiProviderRegistry.ts +++ b/packages/ai/src/provider/AiProviderRegistry.ts @@ -4,8 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { StreamEvent } from "@workglow/task-graph"; -import { TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; import type { JsonSchema, ServiceRegistry } from "@workglow/util/worker"; import { createServiceToken, globalServiceRegistry, WORKER_MANAGER } from "@workglow/util/worker"; import type { AiEmit } from "../capability/AiEmit"; diff --git a/packages/ai/src/task/ChunkRetrievalTask.ts b/packages/ai/src/task/ChunkRetrievalTask.ts index e89cdcda2..9ae02fb4f 100644 --- a/packages/ai/src/task/ChunkRetrievalTask.ts +++ b/packages/ai/src/task/ChunkRetrievalTask.ts @@ -4,11 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { ChunkRecord, ChunkSearchResult } from "@workglow/knowledge-base"; -import { KnowledgeBase, TypeKnowledgeBase } from "@workglow/knowledge-base"; -import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, isTypedArray, TypedArray, TypedArraySchema } from "@workglow/util/schema"; +import type { ChunkRecord, ChunkSearchResult, KnowledgeBase } from "@workglow/knowledge-base"; +import { TypeKnowledgeBase } from "@workglow/knowledge-base"; +import type { IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, TypedArray } from "@workglow/util/schema"; +import { isTypedArray, TypedArraySchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/ChunkVectorUpsertTask.ts b/packages/ai/src/task/ChunkVectorUpsertTask.ts index 95328b702..ae22fd5cf 100644 --- a/packages/ai/src/task/ChunkVectorUpsertTask.ts +++ b/packages/ai/src/task/ChunkVectorUpsertTask.ts @@ -6,9 +6,10 @@ import type { ChunkRecord, KnowledgeBase } from "@workglow/knowledge-base"; import { ChunkRecordArraySchema, TypeKnowledgeBase } from "@workglow/knowledge-base"; -import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, TypedArray, TypedArraySchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, TypedArray } from "@workglow/util/schema"; +import { TypedArraySchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import { TypeSingleOrArray } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/ContextBuilderTask.ts b/packages/ai/src/task/ContextBuilderTask.ts index 6d52c405a..147edb52f 100644 --- a/packages/ai/src/task/ContextBuilderTask.ts +++ b/packages/ai/src/task/ContextBuilderTask.ts @@ -5,15 +5,14 @@ */ import { estimateTokens } from "@workglow/knowledge-base"; -import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { - CreateWorkflow, +import type { IExecuteContext, IExecutePreviewContext, - Task, - Workflow, + IRunConfig, + TaskConfig, } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { CountTokensTask } from "./CountTokensTask"; diff --git a/packages/ai/src/task/CountTokensTask.ts b/packages/ai/src/task/CountTokensTask.ts index 9de5ece5e..efde6bff9 100644 --- a/packages/ai/src/task/CountTokensTask.ts +++ b/packages/ai/src/task/CountTokensTask.ts @@ -6,7 +6,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { AiTask } from "./base/AiTask"; diff --git a/packages/ai/src/task/DocumentEnricherTask.ts b/packages/ai/src/task/DocumentEnricherTask.ts index 44bfc8dfd..daa1ed703 100644 --- a/packages/ai/src/task/DocumentEnricherTask.ts +++ b/packages/ai/src/task/DocumentEnricherTask.ts @@ -4,14 +4,19 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { DocumentRootNode, getChildren, hasChildren } from "@workglow/knowledge-base"; - -import type { DocumentNode, Entity, NodeEnrichment } from "@workglow/knowledge-base"; -import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import { getChildren, hasChildren } from "@workglow/knowledge-base"; + +import type { + DocumentNode, + DocumentRootNode, + Entity, + NodeEnrichment, +} from "@workglow/knowledge-base"; +import type { IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; -import { ModelConfig } from "../model/ModelSchema"; +import type { ModelConfig } from "../model/ModelSchema"; import { TextNamedEntityRecognitionTask } from "./TextNamedEntityRecognitionTask"; import { TextSummaryTask } from "./TextSummaryTask"; import { TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/DocumentUpsertTask.ts b/packages/ai/src/task/DocumentUpsertTask.ts index 348d2a35d..7d546e49e 100644 --- a/packages/ai/src/task/DocumentUpsertTask.ts +++ b/packages/ai/src/task/DocumentUpsertTask.ts @@ -4,16 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { DocumentMetadata, DocumentNode } from "@workglow/knowledge-base"; -import { - Document, - DocumentMetadataSchema, - KnowledgeBase, - TypeKnowledgeBase, -} from "@workglow/knowledge-base"; -import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DocumentMetadata, DocumentNode, KnowledgeBase } from "@workglow/knowledge-base"; +import { Document, DocumentMetadataSchema, TypeKnowledgeBase } from "@workglow/knowledge-base"; +import type { CachePolicy, IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; const inputSchema = { diff --git a/packages/ai/src/task/FaceDetectorTask.ts b/packages/ai/src/task/FaceDetectorTask.ts index 65f12e739..1b43c35af 100644 --- a/packages/ai/src/task/FaceDetectorTask.ts +++ b/packages/ai/src/task/FaceDetectorTask.ts @@ -8,7 +8,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; import type { ImageValue } from "@workglow/util/media"; import { ImageValueSchema } from "@workglow/util/media"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/FaceLandmarkerTask.ts b/packages/ai/src/task/FaceLandmarkerTask.ts index 3a8ae55b1..509465b65 100644 --- a/packages/ai/src/task/FaceLandmarkerTask.ts +++ b/packages/ai/src/task/FaceLandmarkerTask.ts @@ -8,7 +8,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; import type { ImageValue } from "@workglow/util/media"; import { ImageValueSchema } from "@workglow/util/media"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeLandmark, TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/GestureRecognizerTask.ts b/packages/ai/src/task/GestureRecognizerTask.ts index 95909fb27..b4b01f7a5 100644 --- a/packages/ai/src/task/GestureRecognizerTask.ts +++ b/packages/ai/src/task/GestureRecognizerTask.ts @@ -8,7 +8,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; import type { ImageValue } from "@workglow/util/media"; import { ImageValueSchema } from "@workglow/util/media"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeLandmark, TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/HandLandmarkerTask.ts b/packages/ai/src/task/HandLandmarkerTask.ts index 3207257a8..69c7f5de0 100644 --- a/packages/ai/src/task/HandLandmarkerTask.ts +++ b/packages/ai/src/task/HandLandmarkerTask.ts @@ -8,7 +8,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; import type { ImageValue } from "@workglow/util/media"; import { ImageValueSchema } from "@workglow/util/media"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeLandmark, TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/HierarchicalChunkerTask.ts b/packages/ai/src/task/HierarchicalChunkerTask.ts index 76395d739..5f23ab3fb 100644 --- a/packages/ai/src/task/HierarchicalChunkerTask.ts +++ b/packages/ai/src/task/HierarchicalChunkerTask.ts @@ -6,18 +6,23 @@ import { ChunkRecordSchema, - DocumentRootNode, estimateTokens, getChildren, hasChildren, NodeKind, } from "@workglow/knowledge-base"; -import type { ChunkRecord, DocumentNode, SectionNode, TokenBudget } from "@workglow/knowledge-base"; -import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import type { + ChunkRecord, + DocumentNode, + DocumentRootNode, + SectionNode, + TokenBudget, +} from "@workglow/knowledge-base"; +import type { IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; import { uuid4 } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { CountTokensTask } from "./CountTokensTask"; diff --git a/packages/ai/src/task/HierarchyJoinTask.ts b/packages/ai/src/task/HierarchyJoinTask.ts index 2be058a80..aca6f5f7c 100644 --- a/packages/ai/src/task/HierarchyJoinTask.ts +++ b/packages/ai/src/task/HierarchyJoinTask.ts @@ -7,9 +7,9 @@ import { ChunkRecordArraySchema, TypeKnowledgeBase } from "@workglow/knowledge-base"; import type { ChunkRecord, KnowledgeBase } from "@workglow/knowledge-base"; -import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; const inputSchema = { diff --git a/packages/ai/src/task/ImageClassificationTask.ts b/packages/ai/src/task/ImageClassificationTask.ts index 1bad831e3..27ce0ce69 100644 --- a/packages/ai/src/task/ImageClassificationTask.ts +++ b/packages/ai/src/task/ImageClassificationTask.ts @@ -8,7 +8,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; import type { ImageValue } from "@workglow/util/media"; import { ImageValueSchema } from "@workglow/util/media"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeCategory, TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/ImageEmbeddingTask.ts b/packages/ai/src/task/ImageEmbeddingTask.ts index dcfcec655..7777b0b94 100644 --- a/packages/ai/src/task/ImageEmbeddingTask.ts +++ b/packages/ai/src/task/ImageEmbeddingTask.ts @@ -8,12 +8,8 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; import type { ImageValue } from "@workglow/util/media"; import { ImageValueSchema } from "@workglow/util/media"; -import { - DataPortSchema, - FromSchema, - TypedArraySchema, - TypedArraySchemaOptions, -} from "@workglow/util/schema"; +import type { DataPortSchema, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import { TypedArraySchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeModel, TypeSingleOrArray } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/ImageToTextTask.ts b/packages/ai/src/task/ImageToTextTask.ts index 4a1b3dc84..d3a0226e5 100644 --- a/packages/ai/src/task/ImageToTextTask.ts +++ b/packages/ai/src/task/ImageToTextTask.ts @@ -8,7 +8,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; import type { ImageValue } from "@workglow/util/media"; import { ImageValueSchema } from "@workglow/util/media"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/KbAddDocumentTask.ts b/packages/ai/src/task/KbAddDocumentTask.ts index 032b4c9d4..c53ff4f85 100644 --- a/packages/ai/src/task/KbAddDocumentTask.ts +++ b/packages/ai/src/task/KbAddDocumentTask.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { KnowledgeBase } from "@workglow/knowledge-base"; -import { Document, TypeKnowledgeBase } from "@workglow/knowledge-base"; -import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import type { Document, KnowledgeBase } from "@workglow/knowledge-base"; +import { TypeKnowledgeBase } from "@workglow/knowledge-base"; +import type { CachePolicy, IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; diff --git a/packages/ai/src/task/KbDeleteTask.ts b/packages/ai/src/task/KbDeleteTask.ts index f2b8bdab2..319098b4d 100644 --- a/packages/ai/src/task/KbDeleteTask.ts +++ b/packages/ai/src/task/KbDeleteTask.ts @@ -6,8 +6,8 @@ import type { KnowledgeBase } from "@workglow/knowledge-base"; import { TypeKnowledgeBase } from "@workglow/knowledge-base"; -import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; diff --git a/packages/ai/src/task/KbReindexTask.ts b/packages/ai/src/task/KbReindexTask.ts index 087c4fdeb..84e4d5175 100644 --- a/packages/ai/src/task/KbReindexTask.ts +++ b/packages/ai/src/task/KbReindexTask.ts @@ -6,8 +6,8 @@ import type { KnowledgeBase } from "@workglow/knowledge-base"; import { TypeKnowledgeBase } from "@workglow/knowledge-base"; -import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; diff --git a/packages/ai/src/task/KbSearchTask.ts b/packages/ai/src/task/KbSearchTask.ts index feb4d8f91..6c5453bb8 100644 --- a/packages/ai/src/task/KbSearchTask.ts +++ b/packages/ai/src/task/KbSearchTask.ts @@ -6,8 +6,8 @@ import type { ChunkSearchResult, KnowledgeBase } from "@workglow/knowledge-base"; import { chunkText, TypeKnowledgeBase } from "@workglow/knowledge-base"; -import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import type { IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; diff --git a/packages/ai/src/task/KbToDocumentsTask.ts b/packages/ai/src/task/KbToDocumentsTask.ts index 92c065535..209ea2d78 100644 --- a/packages/ai/src/task/KbToDocumentsTask.ts +++ b/packages/ai/src/task/KbToDocumentsTask.ts @@ -4,9 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { DocumentNode, KnowledgeBase, TypeKnowledgeBase } from "@workglow/knowledge-base"; -import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import type { DocumentNode, KnowledgeBase } from "@workglow/knowledge-base"; +import { TypeKnowledgeBase } from "@workglow/knowledge-base"; +import type { CachePolicy, IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; diff --git a/packages/ai/src/task/ModelDownloadRemoveTask.ts b/packages/ai/src/task/ModelDownloadRemoveTask.ts index ac4658443..02b2cd016 100644 --- a/packages/ai/src/task/ModelDownloadRemoveTask.ts +++ b/packages/ai/src/task/ModelDownloadRemoveTask.ts @@ -6,7 +6,7 @@ import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { AiTask } from "./base/AiTask"; diff --git a/packages/ai/src/task/ModelDownloadTask.ts b/packages/ai/src/task/ModelDownloadTask.ts index fc230c4c5..72ba3f905 100644 --- a/packages/ai/src/task/ModelDownloadTask.ts +++ b/packages/ai/src/task/ModelDownloadTask.ts @@ -6,7 +6,7 @@ import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { AiTask } from "./base/AiTask"; diff --git a/packages/ai/src/task/ModelInfoTask.ts b/packages/ai/src/task/ModelInfoTask.ts index 212cb8cc7..0b429f7b2 100644 --- a/packages/ai/src/task/ModelInfoTask.ts +++ b/packages/ai/src/task/ModelInfoTask.ts @@ -7,10 +7,10 @@ import { CreateWorkflow, Workflow } from "@workglow/task-graph"; import type { CachePolicy, IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { accumulatingEmit } from "../capability/accumulatingEmit"; import type { Capability } from "../capability/Capabilities"; -import { ModelConfig } from "../model/ModelSchema"; +import type { ModelConfig } from "../model/ModelSchema"; import { getAiProviderRegistry } from "../provider/AiProviderRegistry"; import { AiTask } from "./base/AiTask"; import { TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/ModelSearchTask.ts b/packages/ai/src/task/ModelSearchTask.ts index 7dc3f259d..e1ef6758b 100644 --- a/packages/ai/src/task/ModelSearchTask.ts +++ b/packages/ai/src/task/ModelSearchTask.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; -import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import type { DataPortSchema } from "@workglow/util/schema"; import { accumulatingEmit } from "../capability/accumulatingEmit"; import type { Capability } from "../capability/Capabilities"; import type { ModelRecord } from "../model/ModelSchema"; diff --git a/packages/ai/src/task/ObjectDetectionTask.ts b/packages/ai/src/task/ObjectDetectionTask.ts index 1843c54f5..61a625651 100644 --- a/packages/ai/src/task/ObjectDetectionTask.ts +++ b/packages/ai/src/task/ObjectDetectionTask.ts @@ -8,7 +8,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; import type { ImageValue } from "@workglow/util/media"; import { ImageValueSchema } from "@workglow/util/media"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeBoundingBox, TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/PoseLandmarkerTask.ts b/packages/ai/src/task/PoseLandmarkerTask.ts index 6aea4ef1c..c12bb35d0 100644 --- a/packages/ai/src/task/PoseLandmarkerTask.ts +++ b/packages/ai/src/task/PoseLandmarkerTask.ts @@ -8,7 +8,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; import type { ImageValue } from "@workglow/util/media"; import { ImageValueSchema } from "@workglow/util/media"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeModel, TypePoseLandmark } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/QueryExpanderTask.ts b/packages/ai/src/task/QueryExpanderTask.ts index e00f3233d..c0afb45e5 100644 --- a/packages/ai/src/task/QueryExpanderTask.ts +++ b/packages/ai/src/task/QueryExpanderTask.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; -import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; export const QueryExpansionMethod = { diff --git a/packages/ai/src/task/RerankerTask.ts b/packages/ai/src/task/RerankerTask.ts index 94d2f7f41..b6b4187e7 100644 --- a/packages/ai/src/task/RerankerTask.ts +++ b/packages/ai/src/task/RerankerTask.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; -import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; const inputSchema = { diff --git a/packages/ai/src/task/StructuralParserTask.ts b/packages/ai/src/task/StructuralParserTask.ts index aedfab6a4..d2a7a7bca 100644 --- a/packages/ai/src/task/StructuralParserTask.ts +++ b/packages/ai/src/task/StructuralParserTask.ts @@ -4,11 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { DocumentRootNode, StructuralParser } from "@workglow/knowledge-base"; -import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import type { DocumentRootNode } from "@workglow/knowledge-base"; +import { StructuralParser } from "@workglow/knowledge-base"; +import type { IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; import { uuid4 } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; const inputSchema = { diff --git a/packages/ai/src/task/TextChunkerTask.ts b/packages/ai/src/task/TextChunkerTask.ts index 3a6375fe4..471d8a572 100644 --- a/packages/ai/src/task/TextChunkerTask.ts +++ b/packages/ai/src/task/TextChunkerTask.ts @@ -6,10 +6,10 @@ import type { ChunkRecord } from "@workglow/knowledge-base"; import { ChunkRecordArraySchema } from "@workglow/knowledge-base"; -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; -import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; export const ChunkingStrategy = { diff --git a/packages/ai/src/task/TextClassificationTask.ts b/packages/ai/src/task/TextClassificationTask.ts index 73d833b90..04746b0b2 100644 --- a/packages/ai/src/task/TextClassificationTask.ts +++ b/packages/ai/src/task/TextClassificationTask.ts @@ -6,7 +6,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { AiTask } from "./base/AiTask"; diff --git a/packages/ai/src/task/TextEmbeddingTask.ts b/packages/ai/src/task/TextEmbeddingTask.ts index b7b438620..3953ab448 100644 --- a/packages/ai/src/task/TextEmbeddingTask.ts +++ b/packages/ai/src/task/TextEmbeddingTask.ts @@ -6,12 +6,8 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { - DataPortSchema, - FromSchema, - TypedArraySchema, - TypedArraySchemaOptions, -} from "@workglow/util/schema"; +import type { DataPortSchema, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import { TypedArraySchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { AiTask } from "./base/AiTask"; diff --git a/packages/ai/src/task/TextFillMaskTask.ts b/packages/ai/src/task/TextFillMaskTask.ts index 7d753473a..0d25b326a 100644 --- a/packages/ai/src/task/TextFillMaskTask.ts +++ b/packages/ai/src/task/TextFillMaskTask.ts @@ -6,7 +6,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { AiTask } from "./base/AiTask"; diff --git a/packages/ai/src/task/TextGenerationTask.ts b/packages/ai/src/task/TextGenerationTask.ts index 6cc79434e..132518609 100644 --- a/packages/ai/src/task/TextGenerationTask.ts +++ b/packages/ai/src/task/TextGenerationTask.ts @@ -12,7 +12,7 @@ import type { TaskConfig, } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { AiJobInput } from "../job/AiJob"; import type { ModelConfig } from "../model/ModelSchema"; diff --git a/packages/ai/src/task/TextLanguageDetectionTask.ts b/packages/ai/src/task/TextLanguageDetectionTask.ts index cb098f7cd..f9341550f 100644 --- a/packages/ai/src/task/TextLanguageDetectionTask.ts +++ b/packages/ai/src/task/TextLanguageDetectionTask.ts @@ -6,7 +6,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { AiTask } from "./base/AiTask"; diff --git a/packages/ai/src/task/TextNamedEntityRecognitionTask.ts b/packages/ai/src/task/TextNamedEntityRecognitionTask.ts index 20de65921..7e0ef9b67 100644 --- a/packages/ai/src/task/TextNamedEntityRecognitionTask.ts +++ b/packages/ai/src/task/TextNamedEntityRecognitionTask.ts @@ -6,7 +6,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { AiTask } from "./base/AiTask"; diff --git a/packages/ai/src/task/TextQuestionAnswerTask.ts b/packages/ai/src/task/TextQuestionAnswerTask.ts index d99d151f6..9ba308835 100644 --- a/packages/ai/src/task/TextQuestionAnswerTask.ts +++ b/packages/ai/src/task/TextQuestionAnswerTask.ts @@ -6,7 +6,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/TextRewriterTask.ts b/packages/ai/src/task/TextRewriterTask.ts index 1f5e0d62b..a7090fa14 100644 --- a/packages/ai/src/task/TextRewriterTask.ts +++ b/packages/ai/src/task/TextRewriterTask.ts @@ -6,7 +6,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/TextSummaryTask.ts b/packages/ai/src/task/TextSummaryTask.ts index aa68b63c9..641a81e3f 100644 --- a/packages/ai/src/task/TextSummaryTask.ts +++ b/packages/ai/src/task/TextSummaryTask.ts @@ -6,7 +6,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/TextTranslationTask.ts b/packages/ai/src/task/TextTranslationTask.ts index 0ff2139d7..549aca466 100644 --- a/packages/ai/src/task/TextTranslationTask.ts +++ b/packages/ai/src/task/TextTranslationTask.ts @@ -6,7 +6,7 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Workflow } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelConfig } from "../model/ModelSchema"; import { TypeLanguage, TypeModel } from "./base/AiTaskSchemas"; diff --git a/packages/ai/src/task/ToolCallingTask.ts b/packages/ai/src/task/ToolCallingTask.ts index ace70ca6b..35fb11a2a 100644 --- a/packages/ai/src/task/ToolCallingTask.ts +++ b/packages/ai/src/task/ToolCallingTask.ts @@ -13,8 +13,9 @@ import type { StreamEvent, TaskConfig, } from "@workglow/task-graph"; -import { makeFingerprint, ServiceRegistry } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { ServiceRegistry } from "@workglow/util"; +import { makeFingerprint } from "@workglow/util"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { AiJobInput } from "../job/AiJob"; import type { ModelConfig } from "../model/ModelSchema"; diff --git a/packages/ai/src/task/TopicSegmenterTask.ts b/packages/ai/src/task/TopicSegmenterTask.ts index 6bc78ad4a..1ceb67c3b 100644 --- a/packages/ai/src/task/TopicSegmenterTask.ts +++ b/packages/ai/src/task/TopicSegmenterTask.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; -import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IRunConfig, TaskConfig } from "@workglow/task-graph"; +import type { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; export const SegmentationMethod = { diff --git a/packages/ai/src/task/VectorQuantizeTask.ts b/packages/ai/src/task/VectorQuantizeTask.ts index 86d7db4e4..a08221a79 100644 --- a/packages/ai/src/task/VectorQuantizeTask.ts +++ b/packages/ai/src/task/VectorQuantizeTask.ts @@ -6,13 +6,8 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; -import { - DataPortSchema, - normalizeNumberArray, - TensorType, - TypedArray, - TypedArraySchema, -} from "@workglow/util/schema"; +import type { DataPortSchema, TypedArray } from "@workglow/util/schema"; +import { normalizeNumberArray, TensorType, TypedArraySchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; const inputSchema = { diff --git a/packages/ai/src/task/VectorSimilarityTask.ts b/packages/ai/src/task/VectorSimilarityTask.ts index d2e5663b2..5b3801bbd 100644 --- a/packages/ai/src/task/VectorSimilarityTask.ts +++ b/packages/ai/src/task/VectorSimilarityTask.ts @@ -6,14 +6,12 @@ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, GraphAsTask, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; import { cosineSimilarity, - DataPortSchema, - FromSchema, hammingSimilarity, jaccardSimilarity, TypedArraySchema, - TypedArraySchemaOptions, } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; diff --git a/packages/ai/src/task/__tests__/types.test-d.ts b/packages/ai/src/task/__tests__/types.test-d.ts index d7b001042..b70599c50 100644 --- a/packages/ai/src/task/__tests__/types.test-d.ts +++ b/packages/ai/src/task/__tests__/types.test-d.ts @@ -6,9 +6,9 @@ import type { FromSchema } from "@workglow/util/schema"; import { describe, expectTypeOf, it } from "vitest"; -import { AiChatInputSchema, type AiChatTaskInput } from "../AiChatTask"; -import { ChunkRetrievalInputSchema, type ChunkRetrievalTaskInput } from "../ChunkRetrievalTask"; -import { ToolCallingInputSchema, type ToolCallingTaskInput } from "../ToolCallingTask"; +import type { AiChatInputSchema, AiChatTaskInput } from "../AiChatTask"; +import type { ChunkRetrievalInputSchema, ChunkRetrievalTaskInput } from "../ChunkRetrievalTask"; +import type { ToolCallingInputSchema, ToolCallingTaskInput } from "../ToolCallingTask"; /** * Drift guard between the JSON schemas in `packages/ai/src/task/*.ts` and diff --git a/packages/ai/src/task/base/AiTask.ts b/packages/ai/src/task/base/AiTask.ts index 7be9c0578..59e1fa097 100644 --- a/packages/ai/src/task/base/AiTask.ts +++ b/packages/ai/src/task/base/AiTask.ts @@ -10,6 +10,7 @@ import type { TaskConfig, TaskEntitlement, TaskEntitlements, + TaskInput, TaskOutput, } from "@workglow/task-graph"; import { @@ -18,7 +19,6 @@ import { TaskConfigSchema, TaskConfigurationError, TaskError, - TaskInput, TaskRegistry, hasStructuredOutput, } from "@workglow/task-graph"; @@ -30,7 +30,8 @@ import type { AiEmit } from "../../capability/AiEmit"; import { noopEmit } from "../../capability/AiEmit"; import type { Capability } from "../../capability/Capabilities"; import { recordUsageTelemetry } from "../../capability/UsageTelemetry"; -import { AiJob, AiJobInput } from "../../job/AiJob"; +import type { AiJobInput } from "../../job/AiJob"; +import { AiJob } from "../../job/AiJob"; import { MODEL_REPOSITORY } from "../../model/ModelRegistry"; import type { ModelRepository } from "../../model/ModelRepository"; import type { ModelConfig } from "../../model/ModelSchema"; diff --git a/packages/ai/src/task/base/AiTaskSchemas.ts b/packages/ai/src/task/base/AiTaskSchemas.ts index 8cddc7ccb..73ba4d675 100644 --- a/packages/ai/src/task/base/AiTaskSchemas.ts +++ b/packages/ai/src/task/base/AiTaskSchemas.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { DataPortSchemaNonBoolean, JsonSchema } from "@workglow/util/schema"; +import type { DataPortSchemaNonBoolean, JsonSchema } from "@workglow/util/schema"; import { ModelConfigSchema } from "../../model/ModelSchema"; export const TypeLanguage = (annotations: Record = {}) => diff --git a/packages/ai/src/task/base/AiVisionTask.ts b/packages/ai/src/task/base/AiVisionTask.ts index 367def397..456007262 100644 --- a/packages/ai/src/task/base/AiVisionTask.ts +++ b/packages/ai/src/task/base/AiVisionTask.ts @@ -6,7 +6,8 @@ import type { TaskConfig, TaskOutput } from "@workglow/task-graph"; -import { AiTask, AiTaskInput } from "./AiTask"; +import type { AiTaskInput } from "./AiTask"; +import { AiTask } from "./AiTask"; /** * A base class for AI vision tasks. diff --git a/packages/ai/src/task/index.test.ts b/packages/ai/src/task/index.test.ts index 885c3eca1..a31b6a3a1 100644 --- a/packages/ai/src/task/index.test.ts +++ b/packages/ai/src/task/index.test.ts @@ -7,7 +7,7 @@ import type { ImageValue } from "@workglow/util/media"; import { describe, expect, it } from "vitest"; import { CAPABILITIES, type Capability } from "../capability/Capabilities"; -import { AiTask } from "./base/AiTask"; +import type { AiTask } from "./base/AiTask"; import type { ImageEmbeddingTaskInput } from "./ImageEmbeddingTask"; import { registerAiTasks } from "./index"; import { StructuredGenerationTask } from "./StructuredGenerationTask"; diff --git a/packages/browser-control/src/task/tasks/BrowserAttributeTask.ts b/packages/browser-control/src/task/tasks/BrowserAttributeTask.ts index 7dce94711..ac6e974a1 100644 --- a/packages/browser-control/src/task/tasks/BrowserAttributeTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserAttributeTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const inputSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserBackTask.ts b/packages/browser-control/src/task/tasks/BrowserBackTask.ts index 9ad58bd42..bc6f1a1e9 100644 --- a/packages/browser-control/src/task/tasks/BrowserBackTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserBackTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const inputSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserClickTask.ts b/packages/browser-control/src/task/tasks/BrowserClickTask.ts index 9bc310b3a..12eb7cf83 100644 --- a/packages/browser-control/src/task/tasks/BrowserClickTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserClickTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserClickTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserCloseTabTask.ts b/packages/browser-control/src/task/tasks/BrowserCloseTabTask.ts index dd93f2339..dd8fc890f 100644 --- a/packages/browser-control/src/task/tasks/BrowserCloseTabTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserCloseTabTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserCloseTabTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserCloseTask.ts b/packages/browser-control/src/task/tasks/BrowserCloseTask.ts index 6d4da845a..2fe1a1bf9 100644 --- a/packages/browser-control/src/task/tasks/BrowserCloseTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserCloseTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const inputSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserEvaluateTask.ts b/packages/browser-control/src/task/tasks/BrowserEvaluateTask.ts index ee957ba3c..753799127 100644 --- a/packages/browser-control/src/task/tasks/BrowserEvaluateTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserEvaluateTask.ts @@ -4,16 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { - Entitlements, +import type { + CachePolicy, IExecuteContext, - Task, TaskConfig, - TaskConfigSchema, TaskEntitlements, } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import { Entitlements, Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const inputSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserExtractHtmlTask.ts b/packages/browser-control/src/task/tasks/BrowserExtractHtmlTask.ts index c10bd890a..07dcc3cf5 100644 --- a/packages/browser-control/src/task/tasks/BrowserExtractHtmlTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserExtractHtmlTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserExtractHtmlTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserExtractTextTask.ts b/packages/browser-control/src/task/tasks/BrowserExtractTextTask.ts index e73f18fb6..3d5b249ef 100644 --- a/packages/browser-control/src/task/tasks/BrowserExtractTextTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserExtractTextTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserExtractTextTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserFillTask.ts b/packages/browser-control/src/task/tasks/BrowserFillTask.ts index 53fad623c..3f05a5a5b 100644 --- a/packages/browser-control/src/task/tasks/BrowserFillTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserFillTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserFillTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserForwardTask.ts b/packages/browser-control/src/task/tasks/BrowserForwardTask.ts index aa498dd07..bfa7700bc 100644 --- a/packages/browser-control/src/task/tasks/BrowserForwardTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserForwardTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const inputSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserHoverTask.ts b/packages/browser-control/src/task/tasks/BrowserHoverTask.ts index 8c1416845..3da4ffa07 100644 --- a/packages/browser-control/src/task/tasks/BrowserHoverTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserHoverTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const inputSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserLoginTask.ts b/packages/browser-control/src/task/tasks/BrowserLoginTask.ts index 3fcdd7865..cee53c66a 100644 --- a/packages/browser-control/src/task/tasks/BrowserLoginTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserLoginTask.ts @@ -4,17 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { - Entitlements, +import type { + CachePolicy, IExecuteContext, - mergeEntitlements, - Task, TaskConfig, - TaskConfigSchema, TaskEntitlements, } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import { Entitlements, mergeEntitlements, Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserLoginTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserNavigateTask.ts b/packages/browser-control/src/task/tasks/BrowserNavigateTask.ts index 136f02fa5..c2dfffd83 100644 --- a/packages/browser-control/src/task/tasks/BrowserNavigateTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserNavigateTask.ts @@ -4,16 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { - Entitlements, +import type { + CachePolicy, IExecuteContext, - Task, TaskConfig, - TaskConfigSchema, TaskEntitlements, } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import { Entitlements, Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserNavigateTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserNewTabTask.ts b/packages/browser-control/src/task/tasks/BrowserNewTabTask.ts index 116c06f0f..76f8c0ecd 100644 --- a/packages/browser-control/src/task/tasks/BrowserNewTabTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserNewTabTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserNewTabTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserPressKeyTask.ts b/packages/browser-control/src/task/tasks/BrowserPressKeyTask.ts index 42577ee94..4c8c6bf35 100644 --- a/packages/browser-control/src/task/tasks/BrowserPressKeyTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserPressKeyTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserPressKeyTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserQuerySelectorTask.ts b/packages/browser-control/src/task/tasks/BrowserQuerySelectorTask.ts index ed04284f6..af5bb8395 100644 --- a/packages/browser-control/src/task/tasks/BrowserQuerySelectorTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserQuerySelectorTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const inputSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserReloadTask.ts b/packages/browser-control/src/task/tasks/BrowserReloadTask.ts index b42da28c1..57b45f7ed 100644 --- a/packages/browser-control/src/task/tasks/BrowserReloadTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserReloadTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const inputSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserScreenshotTask.ts b/packages/browser-control/src/task/tasks/BrowserScreenshotTask.ts index 78cdb5318..c10e3e54d 100644 --- a/packages/browser-control/src/task/tasks/BrowserScreenshotTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserScreenshotTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserScreenshotTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserScrollTask.ts b/packages/browser-control/src/task/tasks/BrowserScrollTask.ts index 2335fb154..e0e2fa221 100644 --- a/packages/browser-control/src/task/tasks/BrowserScrollTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserScrollTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserScrollTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserSelectTask.ts b/packages/browser-control/src/task/tasks/BrowserSelectTask.ts index 5af32aa40..ff9ecfc9a 100644 --- a/packages/browser-control/src/task/tasks/BrowserSelectTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserSelectTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const inputSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserSessionTask.ts b/packages/browser-control/src/task/tasks/BrowserSessionTask.ts index caa396030..f5fe0ce77 100644 --- a/packages/browser-control/src/task/tasks/BrowserSessionTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserSessionTask.ts @@ -4,17 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { - Entitlements, +import type { + CachePolicy, IExecuteContext, - mergeEntitlements, - Task, TaskConfig, - TaskConfigSchema, TaskEntitlements, } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import { Entitlements, mergeEntitlements, Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; import { getBrowserDeps } from "../BrowserTaskDeps"; diff --git a/packages/browser-control/src/task/tasks/BrowserSnapshotTask.ts b/packages/browser-control/src/task/tasks/BrowserSnapshotTask.ts index 35e1310f5..629fc5e3f 100644 --- a/packages/browser-control/src/task/tasks/BrowserSnapshotTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserSnapshotTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; import type { AccessibilityTree } from "../IBrowserContext"; diff --git a/packages/browser-control/src/task/tasks/BrowserSwitchTabTask.ts b/packages/browser-control/src/task/tasks/BrowserSwitchTabTask.ts index f8b68644d..550f992d4 100644 --- a/packages/browser-control/src/task/tasks/BrowserSwitchTabTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserSwitchTabTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserSwitchTabTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserTypeTask.ts b/packages/browser-control/src/task/tasks/BrowserTypeTask.ts index 7a3f9e830..7f3657e06 100644 --- a/packages/browser-control/src/task/tasks/BrowserTypeTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserTypeTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserTypeTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserUploadTask.ts b/packages/browser-control/src/task/tasks/BrowserUploadTask.ts index c607b3bd9..b3cbad651 100644 --- a/packages/browser-control/src/task/tasks/BrowserUploadTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserUploadTask.ts @@ -4,16 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { - Entitlements, +import type { + CachePolicy, IExecuteContext, - Task, TaskConfig, - TaskConfigSchema, TaskEntitlements, } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import { Entitlements, Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserUploadTaskConfigSchema = { diff --git a/packages/browser-control/src/task/tasks/BrowserWaitTask.ts b/packages/browser-control/src/task/tasks/BrowserWaitTask.ts index 689363647..b5da82a4c 100644 --- a/packages/browser-control/src/task/tasks/BrowserWaitTask.ts +++ b/packages/browser-control/src/task/tasks/BrowserWaitTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskConfig, TaskConfigSchema } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigSchema } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { BrowserSessionRegistry } from "../BrowserSessionRegistry"; const browserWaitTaskConfigSchema = { diff --git a/packages/indexeddb/src/storage/IndexedDbKvStorage.ts b/packages/indexeddb/src/storage/IndexedDbKvStorage.ts index e07bbc56b..b53e22631 100644 --- a/packages/indexeddb/src/storage/IndexedDbKvStorage.ts +++ b/packages/indexeddb/src/storage/IndexedDbKvStorage.ts @@ -4,14 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - DefaultKeyValueKey, - DefaultKeyValueSchema, - IKvStorage, - KvViaTabularStorage, -} from "@workglow/storage"; +import type { IKvStorage } from "@workglow/storage"; +import { DefaultKeyValueKey, DefaultKeyValueSchema, KvViaTabularStorage } from "@workglow/storage"; import { createServiceToken } from "@workglow/util"; -import { JsonSchema } from "@workglow/util/schema"; +import type { JsonSchema } from "@workglow/util/schema"; import { IndexedDbTabularStorage } from "./IndexedDbTabularStorage"; export const IDB_KV_REPOSITORY = createServiceToken>( diff --git a/packages/indexeddb/src/storage/IndexedDbTabularStorage.ts b/packages/indexeddb/src/storage/IndexedDbTabularStorage.ts index 24b6edaba..880761331 100644 --- a/packages/indexeddb/src/storage/IndexedDbTabularStorage.ts +++ b/packages/indexeddb/src/storage/IndexedDbTabularStorage.ts @@ -4,33 +4,40 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { +import type { AnyTabularStorage, AutoGeneratedKeys, - BaseTabularStorage, ClientProvidedKeysOption, CoveringIndexQueryOptions, DeleteSearchCriteria, - HybridSubscriptionManager, InsertEntity, - isSearchCondition, - isSearchInCondition, KeyGenerationStrategy, - normalizeCriterion, - pickCoveringIndex, QueryOptions, - safeEmit, SearchCriteria, SearchOperator, SimplifyPrimaryKey, TabularChangePayload, TabularSubscribeOptions, +} from "@workglow/storage"; +import { + BaseTabularStorage, + HybridSubscriptionManager, + isSearchCondition, + isSearchInCondition, + normalizeCriterion, + pickCoveringIndex, + safeEmit, type ITabularMigration, type ITabularMigrationApplier, } from "@workglow/storage"; import { createServiceToken, deepEqual, makeFingerprint, uuid4 } from "@workglow/util"; -import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; -import { ensureIndexedDbTable, ExpectedIndexDefinition, MigrationOptions } from "./IndexedDbTable"; +import type { + DataPortSchemaObject, + FromSchema, + TypedArraySchemaOptions, +} from "@workglow/util/schema"; +import type { ExpectedIndexDefinition, MigrationOptions } from "./IndexedDbTable"; +import { ensureIndexedDbTable } from "./IndexedDbTable"; import { idbObjectStoreExists, IndexedDbTabularMigrationApplier, diff --git a/packages/javascript/src/task/JavaScriptTask.ts b/packages/javascript/src/task/JavaScriptTask.ts index c6f559142..cc13481d4 100644 --- a/packages/javascript/src/task/JavaScriptTask.ts +++ b/packages/javascript/src/task/JavaScriptTask.ts @@ -4,18 +4,17 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { TaskEntitlements } from "@workglow/task-graph"; +import type { TaskConfig, TaskEntitlements } from "@workglow/task-graph"; import { CreateWorkflow, Entitlements, Task, - TaskConfig, TaskConfigSchema, TaskInvalidInputError, TaskRegistry, Workflow, } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { Interpreter } from "./interpreter"; const isValidIdentifier = (key: string) => /^[a-z_$][\w$]*$/i.test(key); diff --git a/packages/job-queue/src/job/JobErrorRegistry.ts b/packages/job-queue/src/job/JobErrorRegistry.ts index 06176104e..7862bf4fe 100644 --- a/packages/job-queue/src/job/JobErrorRegistry.ts +++ b/packages/job-queue/src/job/JobErrorRegistry.ts @@ -5,7 +5,7 @@ */ import { getLogger } from "@workglow/util"; -import { JobError } from "./JobError"; +import type { JobError } from "./JobError"; /** * Reconstructs a domain-specific {@link JobError} from a persisted error code diff --git a/packages/job-queue/src/job/JobQueueClient.ts b/packages/job-queue/src/job/JobQueueClient.ts index 54a5c15e1..c49bbecf1 100644 --- a/packages/job-queue/src/job/JobQueueClient.ts +++ b/packages/job-queue/src/job/JobQueueClient.ts @@ -20,15 +20,15 @@ import { } from "./JobError"; import { applyPersistedDiagnosticsToStack } from "./JobErrorDiagnostics"; import { lookupErrorCodeReconstructor } from "./JobErrorRegistry"; -import { +import type { JobProgressListener, JobQueueEventListener, JobQueueEventListeners, JobQueueEventParameters, JobQueueEvents, JobStreamListener, - type StreamChunkRow, - type StreamEventLike, + StreamChunkRow, + StreamEventLike, } from "./JobQueueEventListeners"; import type { JobQueueServer } from "./JobQueueServer"; import { storageToClass } from "./JobStorageConverters"; diff --git a/packages/job-queue/src/job/JobQueueEventListeners.ts b/packages/job-queue/src/job/JobQueueEventListeners.ts index d3207e232..10520697a 100644 --- a/packages/job-queue/src/job/JobQueueEventListeners.ts +++ b/packages/job-queue/src/job/JobQueueEventListeners.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EventParameters } from "@workglow/util"; +import type { EventParameters } from "@workglow/util"; /** * Events that can be emitted by the JobQueue diff --git a/packages/job-queue/src/job/JobQueueServer.ts b/packages/job-queue/src/job/JobQueueServer.ts index acea91496..bf63be1ac 100644 --- a/packages/job-queue/src/job/JobQueueServer.ts +++ b/packages/job-queue/src/job/JobQueueServer.ts @@ -5,15 +5,15 @@ */ import { EventEmitter, getLogger } from "@workglow/util"; -import { ILimiter } from "../limiter/ILimiter"; +import type { ILimiter } from "../limiter/ILimiter"; import { NullLimiter } from "../limiter/NullLimiter"; import type { IJobStore } from "../queue-storage/IJobStore"; import type { IMessageQueue } from "../queue-storage/IMessageQueue"; import type { JobStorageFormat, QueueChangePayload } from "../queue-storage/IQueueStorage"; import { JobStatus } from "../queue-storage/IQueueStorage"; import type { DeadLetter } from "./DeadLetter"; -import { Job, JobClass } from "./Job"; -import { JobQueueClient } from "./JobQueueClient"; +import type { Job, JobClass } from "./Job"; +import type { JobQueueClient } from "./JobQueueClient"; import type { StreamEventLike } from "./JobQueueEventListeners"; import { JobQueueWorker } from "./JobQueueWorker"; import { storageToClass } from "./JobStorageConverters"; diff --git a/packages/job-queue/src/job/JobQueueWorker.ts b/packages/job-queue/src/job/JobQueueWorker.ts index f11c54e7c..3719483fa 100644 --- a/packages/job-queue/src/job/JobQueueWorker.ts +++ b/packages/job-queue/src/job/JobQueueWorker.ts @@ -13,7 +13,7 @@ import { SpanStatusCode, uuid4, } from "@workglow/util"; -import { ILimiter } from "../limiter/ILimiter"; +import type { ILimiter } from "../limiter/ILimiter"; import { NullLimiter } from "../limiter/NullLimiter"; import type { IClaim } from "../queue-storage/IClaim"; import type { IJobStore } from "../queue-storage/IJobStore"; @@ -21,7 +21,7 @@ import type { IMessageQueue } from "../queue-storage/IMessageQueue"; import type { JobStorageFormat } from "../queue-storage/IQueueStorage"; import { JobStatus } from "../queue-storage/IQueueStorage"; import type { DeadLetter } from "./DeadLetter"; -import { Job, JobClass } from "./Job"; +import type { Job, JobClass } from "./Job"; import { AbortSignalJobError, JobDisabledError, diff --git a/packages/job-queue/src/job/JobStorageConverters.ts b/packages/job-queue/src/job/JobStorageConverters.ts index af632412e..475fe1986 100644 --- a/packages/job-queue/src/job/JobStorageConverters.ts +++ b/packages/job-queue/src/job/JobStorageConverters.ts @@ -5,9 +5,8 @@ */ import { DEFAULT_LIMITS } from "@workglow/util"; -import type { JobStorageFormat } from "../queue-storage/IQueueStorage"; -import { JobStatus } from "../queue-storage/IQueueStorage"; -import { Job, JobClass } from "./Job"; +import type { JobStatus, JobStorageFormat } from "../queue-storage/IQueueStorage"; +import type { Job, JobClass } from "./Job"; /** * Convert a date string to a Date object, or null if invalid diff --git a/packages/job-queue/src/limiter/CompositeLimiter.ts b/packages/job-queue/src/limiter/CompositeLimiter.ts index 751912119..784302777 100644 --- a/packages/job-queue/src/limiter/CompositeLimiter.ts +++ b/packages/job-queue/src/limiter/CompositeLimiter.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ILimiter, LimiterScope } from "./ILimiter"; +import type { ILimiter, LimiterScope } from "./ILimiter"; export class CompositeLimiter implements ILimiter { private limiters: ILimiter[] = []; diff --git a/packages/job-queue/src/limiter/ConcurrencyLimiter.ts b/packages/job-queue/src/limiter/ConcurrencyLimiter.ts index 30786cb7c..a22e89da7 100644 --- a/packages/job-queue/src/limiter/ConcurrencyLimiter.ts +++ b/packages/job-queue/src/limiter/ConcurrencyLimiter.ts @@ -5,7 +5,7 @@ */ import { createServiceToken } from "@workglow/util"; -import { ILimiter, LimiterScope } from "./ILimiter"; +import type { ILimiter, LimiterScope } from "./ILimiter"; export const CONCURRENT_JOB_LIMITER = createServiceToken("jobqueue.limiter.concurrent"); diff --git a/packages/job-queue/src/limiter/DelayLimiter.ts b/packages/job-queue/src/limiter/DelayLimiter.ts index 69d67b318..bc480bf56 100644 --- a/packages/job-queue/src/limiter/DelayLimiter.ts +++ b/packages/job-queue/src/limiter/DelayLimiter.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ILimiter, LimiterScope } from "./ILimiter"; +import type { ILimiter, LimiterScope } from "./ILimiter"; export class DelayLimiter implements ILimiter { /** In-memory state — not shared across processes. */ diff --git a/packages/job-queue/src/limiter/EvenlySpacedRateLimiter.ts b/packages/job-queue/src/limiter/EvenlySpacedRateLimiter.ts index 668b7fbc7..9e5693ac7 100644 --- a/packages/job-queue/src/limiter/EvenlySpacedRateLimiter.ts +++ b/packages/job-queue/src/limiter/EvenlySpacedRateLimiter.ts @@ -5,7 +5,7 @@ */ import { createServiceToken } from "@workglow/util"; -import { ILimiter, LimiterScope, RateLimiterOptions } from "./ILimiter"; +import type { ILimiter, LimiterScope, RateLimiterOptions } from "./ILimiter"; export const EVENLY_SPACED_JOB_RATE_LIMITER = createServiceToken( "jobqueue.limiter.rate.evenlyspaced" diff --git a/packages/job-queue/src/limiter/NullLimiter.ts b/packages/job-queue/src/limiter/NullLimiter.ts index 1bab7ed4f..7081ac0dd 100644 --- a/packages/job-queue/src/limiter/NullLimiter.ts +++ b/packages/job-queue/src/limiter/NullLimiter.ts @@ -5,7 +5,7 @@ */ import { createServiceToken } from "@workglow/util"; -import { ILimiter, LimiterScope } from "./ILimiter"; +import type { ILimiter, LimiterScope } from "./ILimiter"; export const NULL_JOB_LIMITER = createServiceToken("jobqueue.limiter.null"); diff --git a/packages/job-queue/src/limiter/RateLimiter.ts b/packages/job-queue/src/limiter/RateLimiter.ts index 107c41581..d81467f42 100644 --- a/packages/job-queue/src/limiter/RateLimiter.ts +++ b/packages/job-queue/src/limiter/RateLimiter.ts @@ -5,7 +5,7 @@ */ import type { IRateLimiterStorage } from "../rate-limiter-storage/IRateLimiterStorage"; -import { ILimiter, LimiterScope, RateLimiterWithBackoffOptions } from "./ILimiter"; +import type { ILimiter, LimiterScope, RateLimiterWithBackoffOptions } from "./ILimiter"; /** * Base rate limiter implementation that uses a storage backend. diff --git a/packages/job-queue/src/queue-storage/InMemoryQueueStorage.ts b/packages/job-queue/src/queue-storage/InMemoryQueueStorage.ts index 35f1fecd8..ef7aec5c1 100644 --- a/packages/job-queue/src/queue-storage/InMemoryQueueStorage.ts +++ b/packages/job-queue/src/queue-storage/InMemoryQueueStorage.ts @@ -13,14 +13,14 @@ import { uuid4, } from "@workglow/util"; import type { StreamChunkRow, StreamEventLike } from "../job/JobQueueEventListeners"; -import { +import type { IQueueStorage, - JobStatus, JobStorageFormat, QueueChangePayload, QueueStorageOptions, QueueSubscribeOptions, } from "./IQueueStorage"; +import { JobStatus } from "./IQueueStorage"; import { validateLeaseMs } from "./validateLeaseMs"; /** diff --git a/packages/job-queue/src/rate-limiter-storage/InMemoryRateLimiterStorage.ts b/packages/job-queue/src/rate-limiter-storage/InMemoryRateLimiterStorage.ts index eb772e978..0705e7e06 100644 --- a/packages/job-queue/src/rate-limiter-storage/InMemoryRateLimiterStorage.ts +++ b/packages/job-queue/src/rate-limiter-storage/InMemoryRateLimiterStorage.ts @@ -5,7 +5,7 @@ */ import { createServiceToken, sleep, uuid4 } from "@workglow/util"; -import { +import type { IRateLimiterStorage, RateLimiterStorageOptions, RateLimiterStorageScope, diff --git a/packages/knowledge-base/src/chunk/ChunkVectorStorageSchema.ts b/packages/knowledge-base/src/chunk/ChunkVectorStorageSchema.ts index b509dcd39..422a94a66 100644 --- a/packages/knowledge-base/src/chunk/ChunkVectorStorageSchema.ts +++ b/packages/knowledge-base/src/chunk/ChunkVectorStorageSchema.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { IVectorStorage } from "@workglow/storage"; +import type { IVectorStorage } from "@workglow/storage"; import type { DataPortSchemaObject, TypedArray } from "@workglow/util/schema"; import { TypedArraySchema } from "@workglow/util/schema"; import type { ChunkRecord } from "./ChunkSchema"; diff --git a/packages/knowledge-base/src/document/DocumentStorageSchema.ts b/packages/knowledge-base/src/document/DocumentStorageSchema.ts index 47f5c4681..113d5e4f7 100644 --- a/packages/knowledge-base/src/document/DocumentStorageSchema.ts +++ b/packages/knowledge-base/src/document/DocumentStorageSchema.ts @@ -4,9 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ITabularStorage } from "@workglow/storage"; -import type { DataPortSchemaObject, FromSchema } from "@workglow/util/schema"; -import { TypedArraySchemaOptions } from "@workglow/util/schema"; +import type { ITabularStorage } from "@workglow/storage"; +import type { + DataPortSchemaObject, + FromSchema, + TypedArraySchemaOptions, +} from "@workglow/util/schema"; export const DocumentStorageSchema = { type: "object", diff --git a/packages/knowledge-base/src/knowledge-base/KnowledgeBaseRegistry.ts b/packages/knowledge-base/src/knowledge-base/KnowledgeBaseRegistry.ts index b55a8b55c..e06e68699 100644 --- a/packages/knowledge-base/src/knowledge-base/KnowledgeBaseRegistry.ts +++ b/packages/knowledge-base/src/knowledge-base/KnowledgeBaseRegistry.ts @@ -4,16 +4,16 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { ServiceRegistry } from "@workglow/util"; import { createServiceToken, globalServiceRegistry, registerInputCompactor, registerInputResolver, - ServiceRegistry, } from "@workglow/util"; import { InMemoryKnowledgeBaseRepository } from "./InMemoryKnowledgeBaseRepository"; import type { KnowledgeBase } from "./KnowledgeBase"; -import { KnowledgeBaseRepository } from "./KnowledgeBaseRepository"; +import type { KnowledgeBaseRepository } from "./KnowledgeBaseRepository"; import type { KnowledgeBaseRecord } from "./KnowledgeBaseSchema"; import { knowledgeBaseTableNames } from "./KnowledgeBaseSchema"; import { SHARED_CHUNK_TABLE, SHARED_DOCUMENT_TABLE } from "./SharedTableSchemas"; diff --git a/packages/knowledge-base/src/knowledge-base/KnowledgeBaseRepository.ts b/packages/knowledge-base/src/knowledge-base/KnowledgeBaseRepository.ts index 7a653a65a..d677a1a78 100644 --- a/packages/knowledge-base/src/knowledge-base/KnowledgeBaseRepository.ts +++ b/packages/knowledge-base/src/knowledge-base/KnowledgeBaseRepository.ts @@ -8,8 +8,11 @@ import type { ITabularStorage } from "@workglow/storage"; import type { EventParameters } from "@workglow/util"; import { EventEmitter } from "@workglow/util"; -import type { KnowledgeBaseRecord } from "./KnowledgeBaseSchema"; -import { KnowledgeBasePrimaryKeyNames, KnowledgeBaseRecordSchema } from "./KnowledgeBaseSchema"; +import type { + KnowledgeBasePrimaryKeyNames, + KnowledgeBaseRecord, + KnowledgeBaseRecordSchema, +} from "./KnowledgeBaseSchema"; export type KnowledgeBaseEventListeners = { knowledge_base_added: (record: KnowledgeBaseRecord) => void; diff --git a/packages/mcp/src/tasks/McpListTask.ts b/packages/mcp/src/tasks/McpListTask.ts index 5e76b69d5..2f22f1977 100644 --- a/packages/mcp/src/tasks/McpListTask.ts +++ b/packages/mcp/src/tasks/McpListTask.ts @@ -10,17 +10,21 @@ import { getMcpTaskDeps, TypeMcpServer, } from "@workglow/mcp/util"; -import type { CachePolicy, IRunConfig, TaskEntitlements } from "@workglow/task-graph"; +import type { + CachePolicy, + IExecuteContext, + IRunConfig, + TaskConfig, + TaskEntitlements, +} from "@workglow/task-graph"; import { CreateWorkflow, Entitlements, - IExecuteContext, mergeEntitlements, Task, - TaskConfig, Workflow, } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const mcpListTypes = ["tools", "resources", "prompts"] as const; diff --git a/packages/mcp/src/tasks/McpPromptGetTask.ts b/packages/mcp/src/tasks/McpPromptGetTask.ts index 197ad8e38..eadf19ed3 100644 --- a/packages/mcp/src/tasks/McpPromptGetTask.ts +++ b/packages/mcp/src/tasks/McpPromptGetTask.ts @@ -11,19 +11,22 @@ import { getMcpTaskDeps, TypeMcpServer, } from "@workglow/mcp/util"; -import type { CachePolicy, TaskEntitlements } from "@workglow/task-graph"; +import type { + CachePolicy, + IExecuteContext, + TaskConfig, + TaskEntitlements, +} from "@workglow/task-graph"; import { CreateWorkflow, Entitlements, - IExecuteContext, mergeEntitlements, Task, - TaskConfig, TaskConfigSchema, Workflow, } from "@workglow/task-graph"; import type { ServiceRegistry } from "@workglow/util"; -import { DataPortSchema, DataPortSchemaObject, FromSchema } from "@workglow/util/schema"; +import type { DataPortSchema, DataPortSchemaObject, FromSchema } from "@workglow/util/schema"; import type { McpListTaskInput } from "./McpListTask"; import { mcpList } from "./McpListTask"; diff --git a/packages/mcp/src/tasks/McpResourceReadTask.ts b/packages/mcp/src/tasks/McpResourceReadTask.ts index 37770defc..768654b66 100644 --- a/packages/mcp/src/tasks/McpResourceReadTask.ts +++ b/packages/mcp/src/tasks/McpResourceReadTask.ts @@ -10,18 +10,21 @@ import { getMcpTaskDeps, TypeMcpServer, } from "@workglow/mcp/util"; -import type { CachePolicy, TaskEntitlements } from "@workglow/task-graph"; +import type { + CachePolicy, + IExecuteContext, + TaskConfig, + TaskEntitlements, +} from "@workglow/task-graph"; import { CreateWorkflow, Entitlements, - IExecuteContext, mergeEntitlements, Task, - TaskConfig, TaskConfigSchema, Workflow, } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const contentItemSchema = { anyOf: [ diff --git a/packages/mcp/src/tasks/McpSearchTask.ts b/packages/mcp/src/tasks/McpSearchTask.ts index f035161d2..ad572dbd2 100644 --- a/packages/mcp/src/tasks/McpSearchTask.ts +++ b/packages/mcp/src/tasks/McpSearchTask.ts @@ -4,16 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy, TaskEntitlements } from "@workglow/task-graph"; -import { - CreateWorkflow, - Entitlements, +import type { + CachePolicy, IExecuteContext, - Task, TaskConfig, - Workflow, + TaskEntitlements, } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import { CreateWorkflow, Entitlements, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const MCP_REGISTRY_BASE = "https://registry.modelcontextprotocol.io/v0.1"; diff --git a/packages/mcp/src/tasks/McpToolCallTask.ts b/packages/mcp/src/tasks/McpToolCallTask.ts index ace3e7440..1b2ed0922 100644 --- a/packages/mcp/src/tasks/McpToolCallTask.ts +++ b/packages/mcp/src/tasks/McpToolCallTask.ts @@ -11,19 +11,22 @@ import { getMcpTaskDeps, TypeMcpServer, } from "@workglow/mcp/util"; -import type { CachePolicy, TaskEntitlements } from "@workglow/task-graph"; +import type { + CachePolicy, + IExecuteContext, + TaskConfig, + TaskEntitlements, +} from "@workglow/task-graph"; import { CreateWorkflow, Entitlements, - IExecuteContext, mergeEntitlements, Task, - TaskConfig, TaskConfigSchema, Workflow, } from "@workglow/task-graph"; import type { ServiceRegistry } from "@workglow/util"; -import { DataPortSchema, DataPortSchemaObject } from "@workglow/util/schema"; +import type { DataPortSchema, DataPortSchemaObject } from "@workglow/util/schema"; import type { McpListTaskInput } from "./McpListTask"; import { mcpList } from "./McpListTask"; diff --git a/packages/mcp/src/util/_server-registry/McpServerRegistry.ts b/packages/mcp/src/util/_server-registry/McpServerRegistry.ts index 04bf25224..8c858b882 100644 --- a/packages/mcp/src/util/_server-registry/McpServerRegistry.ts +++ b/packages/mcp/src/util/_server-registry/McpServerRegistry.ts @@ -4,15 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { ServiceRegistry } from "@workglow/util"; import { createServiceToken, globalServiceRegistry, registerInputCompactor, registerInputResolver, - ServiceRegistry, } from "@workglow/util"; import { InMemoryMcpServerRepository } from "./InMemoryMcpServerRepository"; -import { McpServerRepository } from "./McpServerRepository"; +import type { McpServerRepository } from "./McpServerRepository"; import type { McpServerRecord } from "./McpServerSchema"; export interface McpServerConnection { diff --git a/packages/mcp/src/util/_server-registry/McpServerRepository.ts b/packages/mcp/src/util/_server-registry/McpServerRepository.ts index 592f07d73..6da1cec1d 100644 --- a/packages/mcp/src/util/_server-registry/McpServerRepository.ts +++ b/packages/mcp/src/util/_server-registry/McpServerRepository.ts @@ -8,8 +8,11 @@ import type { ITabularStorage } from "@workglow/storage"; import type { EventParameters } from "@workglow/util"; import { EventEmitter } from "@workglow/util"; -import type { McpServerRecord } from "./McpServerSchema"; -import { McpServerPrimaryKeyNames, McpServerRecordSchema } from "./McpServerSchema"; +import type { + McpServerPrimaryKeyNames, + McpServerRecord, + McpServerRecordSchema, +} from "./McpServerSchema"; export type McpServerEventListeners = { server_added: (record: McpServerRecord) => void; diff --git a/packages/storage/src/kv/FsFolderJsonKvStorage.ts b/packages/storage/src/kv/FsFolderJsonKvStorage.ts index 0951ebf7b..acbd35f9d 100644 --- a/packages/storage/src/kv/FsFolderJsonKvStorage.ts +++ b/packages/storage/src/kv/FsFolderJsonKvStorage.ts @@ -5,9 +5,10 @@ */ import { createServiceToken } from "@workglow/util"; -import { JsonSchema } from "@workglow/util/schema"; +import type { JsonSchema } from "@workglow/util/schema"; import { FsFolderTabularStorage } from "../tabular/FsFolderTabularStorage"; -import { DefaultKeyValueKey, DefaultKeyValueSchema, IKvStorage } from "./IKvStorage"; +import type { IKvStorage } from "./IKvStorage"; +import { DefaultKeyValueKey, DefaultKeyValueSchema } from "./IKvStorage"; import { KvViaTabularStorage } from "./KvViaTabularStorage"; export const FS_FOLDER_JSON_KV_REPOSITORY = createServiceToken>( diff --git a/packages/storage/src/kv/FsFolderKvStorage.ts b/packages/storage/src/kv/FsFolderKvStorage.ts index f6cd2b7e7..86eb01bce 100644 --- a/packages/storage/src/kv/FsFolderKvStorage.ts +++ b/packages/storage/src/kv/FsFolderKvStorage.ts @@ -5,12 +5,12 @@ */ import { createServiceToken } from "@workglow/util"; -import { JsonSchema } from "@workglow/util/schema"; +import type { JsonSchema } from "@workglow/util/schema"; import { mkdir, readFile, rm, unlink, writeFile } from "fs/promises"; import path from "path"; import { safeEmit } from "../events/safeEmit"; import { StorageUnsupportedError } from "../tabular/StorageError"; -import { IKvStorage } from "./IKvStorage"; +import type { IKvStorage } from "./IKvStorage"; import { KvStorage } from "./KvStorage"; export const FS_FOLDER_KV_REPOSITORY = createServiceToken>( diff --git a/packages/storage/src/kv/IKvStorage.ts b/packages/storage/src/kv/IKvStorage.ts index 3cda7ded4..e02eaa075 100644 --- a/packages/storage/src/kv/IKvStorage.ts +++ b/packages/storage/src/kv/IKvStorage.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EventParameters } from "@workglow/util"; -import { DataPortSchemaObject } from "@workglow/util/schema"; -import { JSONValue } from "../tabular/ITabularStorage"; +import type { EventParameters } from "@workglow/util"; +import type { DataPortSchemaObject } from "@workglow/util/schema"; +import type { JSONValue } from "../tabular/ITabularStorage"; export const DefaultKeyValueSchema = { type: "object", diff --git a/packages/storage/src/kv/InMemoryKvStorage.ts b/packages/storage/src/kv/InMemoryKvStorage.ts index 5fd732bd3..b0e4571d3 100644 --- a/packages/storage/src/kv/InMemoryKvStorage.ts +++ b/packages/storage/src/kv/InMemoryKvStorage.ts @@ -5,9 +5,10 @@ */ import { createServiceToken } from "@workglow/util"; -import { JsonSchema } from "@workglow/util/schema"; +import type { JsonSchema } from "@workglow/util/schema"; import { InMemoryTabularStorage } from "../tabular/InMemoryTabularStorage"; -import { DefaultKeyValueKey, DefaultKeyValueSchema, IKvStorage } from "./IKvStorage"; +import type { IKvStorage } from "./IKvStorage"; +import { DefaultKeyValueKey, DefaultKeyValueSchema } from "./IKvStorage"; import { KvViaTabularStorage } from "./KvViaTabularStorage"; export const MEMORY_KV_REPOSITORY = createServiceToken>( diff --git a/packages/storage/src/kv/KvStorage.ts b/packages/storage/src/kv/KvStorage.ts index de0f2bcf8..eb8994e3e 100644 --- a/packages/storage/src/kv/KvStorage.ts +++ b/packages/storage/src/kv/KvStorage.ts @@ -5,9 +5,9 @@ */ import { createServiceToken, EventEmitter, makeFingerprint } from "@workglow/util"; -import { JsonSchema } from "@workglow/util/schema"; -import { JSONValue } from "../tabular/ITabularStorage"; -import { +import type { JsonSchema } from "@workglow/util/schema"; +import type { JSONValue } from "../tabular/ITabularStorage"; +import type { IKvStorage, KvEventListener, KvEventListeners, diff --git a/packages/storage/src/kv/KvViaTabularStorage.ts b/packages/storage/src/kv/KvViaTabularStorage.ts index d09e8ab98..f403e47b1 100644 --- a/packages/storage/src/kv/KvViaTabularStorage.ts +++ b/packages/storage/src/kv/KvViaTabularStorage.ts @@ -7,7 +7,7 @@ import { getLogger } from "@workglow/util"; import { safeEmit } from "../events/safeEmit"; import type { BaseTabularStorage } from "../tabular/BaseTabularStorage"; -import { DefaultKeyValueKey, DefaultKeyValueSchema } from "./IKvStorage"; +import type { DefaultKeyValueKey, DefaultKeyValueSchema } from "./IKvStorage"; import { KvStorage } from "./KvStorage"; /** Schema types that are stored as-is without JSON serialization. */ diff --git a/packages/storage/src/tabular/BaseSqlTabularStorage.ts b/packages/storage/src/tabular/BaseSqlTabularStorage.ts index 1ec646171..eb4d59cba 100644 --- a/packages/storage/src/tabular/BaseSqlTabularStorage.ts +++ b/packages/storage/src/tabular/BaseSqlTabularStorage.ts @@ -4,15 +4,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { +import type { DataPortSchemaObject, FromSchema, JsonSchema, TypedArraySchemaOptions, } from "@workglow/util/schema"; -import { BaseTabularStorage, ClientProvidedKeysOption } from "./BaseTabularStorage"; +import type { ClientProvidedKeysOption } from "./BaseTabularStorage"; +import { BaseTabularStorage } from "./BaseTabularStorage"; import { assertCursorMatches, decodeCursor } from "./Cursor"; -import { +import type { AutoGeneratedKeys, InsertEntity, OrderBy, diff --git a/packages/storage/src/tabular/BaseTabularStorage.ts b/packages/storage/src/tabular/BaseTabularStorage.ts index f9b0eb8f1..4ab3e9e2d 100644 --- a/packages/storage/src/tabular/BaseTabularStorage.ts +++ b/packages/storage/src/tabular/BaseTabularStorage.ts @@ -5,30 +5,27 @@ */ import { createServiceToken, EventEmitter, makeFingerprint } from "@workglow/util"; -import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import type { + DataPortSchemaObject, + FromSchema, + TypedArraySchemaOptions, +} from "@workglow/util/schema"; import { safeEmit } from "../events/safeEmit"; -import { +import type { ITabularMigration, ITabularMigrationApplier, - runTabularMigrations, RunTabularMigrationsOptions, } from "../migrations"; +import { runTabularMigrations } from "../migrations"; import { CoveringIndexMissingError } from "./CoveringIndexMissingError"; -import { - assertCursorMatches, - CursorPayload, - decodeCursor, - encodeCursor, - PageCursor, -} from "./Cursor"; -import { +import type { CursorPayload, PageCursor } from "./Cursor"; +import { assertCursorMatches, decodeCursor, encodeCursor } from "./Cursor"; +import type { AnyTabularStorage, AutoGeneratedKeys, CoveringIndexQueryOptions, DeleteSearchCriteria, InsertEntity, - isSearchCondition, - isSearchInCondition, ITabularStorage, OrderBy, Page, @@ -45,6 +42,7 @@ import { TabularSubscribeOptions, ValueOptionType, } from "./ITabularStorage"; +import { isSearchCondition, isSearchInCondition } from "./ITabularStorage"; import { StorageEmptyCriteriaError, StorageInvalidColumnError, diff --git a/packages/storage/src/tabular/CachedTabularStorage.ts b/packages/storage/src/tabular/CachedTabularStorage.ts index 525ca2eb1..ec92f4d7c 100644 --- a/packages/storage/src/tabular/CachedTabularStorage.ts +++ b/packages/storage/src/tabular/CachedTabularStorage.ts @@ -5,12 +5,17 @@ */ import { createServiceToken, getLogger } from "@workglow/util"; -import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import type { + DataPortSchemaObject, + FromSchema, + TypedArraySchemaOptions, +} from "@workglow/util/schema"; import { safeEmit } from "../events/safeEmit"; import type { ITabularMigrationApplier } from "../migrations"; -import { BaseTabularStorage, ClientProvidedKeysOption } from "./BaseTabularStorage"; +import type { ClientProvidedKeysOption } from "./BaseTabularStorage"; +import { BaseTabularStorage } from "./BaseTabularStorage"; import { InMemoryTabularStorage } from "./InMemoryTabularStorage"; -import { +import type { AnyTabularStorage, AutoGeneratedKeys, CoveringIndexQueryOptions, diff --git a/packages/storage/src/tabular/FsFolderTabularStorage.ts b/packages/storage/src/tabular/FsFolderTabularStorage.ts index 248e813d9..ded444a49 100644 --- a/packages/storage/src/tabular/FsFolderTabularStorage.ts +++ b/packages/storage/src/tabular/FsFolderTabularStorage.ts @@ -12,19 +12,20 @@ import { sleep, uuid4, } from "@workglow/util"; -import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import type { + DataPortSchemaObject, + FromSchema, + TypedArraySchemaOptions, +} from "@workglow/util/schema"; import { mkdir, readdir, readFile, rm, writeFile } from "node:fs/promises"; import path from "node:path"; import { safeEmit } from "../events/safeEmit"; import { type ITabularMigration, type ITabularMigrationApplier } from "../migrations"; import { PollingSubscriptionManager } from "../util/PollingSubscriptionManager"; -import { - BaseTabularStorage, - ClientProvidedKeysOption, - KeyGenerationStrategy, -} from "./BaseTabularStorage"; +import type { ClientProvidedKeysOption, KeyGenerationStrategy } from "./BaseTabularStorage"; +import { BaseTabularStorage } from "./BaseTabularStorage"; import { InMemoryTabularMigrationApplier } from "./InMemoryTabularMigrationApplier"; -import { +import type { AnyTabularStorage, AutoGeneratedKeys, CoveringIndexQueryOptions, diff --git a/packages/storage/src/tabular/HttpTabularProxyStorage.ts b/packages/storage/src/tabular/HttpTabularProxyStorage.ts index b2474ab8a..690045725 100644 --- a/packages/storage/src/tabular/HttpTabularProxyStorage.ts +++ b/packages/storage/src/tabular/HttpTabularProxyStorage.ts @@ -5,10 +5,15 @@ */ import { createServiceToken, deepEqual, makeFingerprint } from "@workglow/util"; -import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import type { + DataPortSchemaObject, + FromSchema, + TypedArraySchemaOptions, +} from "@workglow/util/schema"; import { safeEmit } from "../events/safeEmit"; import { PollingSubscriptionManager } from "../util/PollingSubscriptionManager"; -import { BaseTabularStorage, ClientProvidedKeysOption } from "./BaseTabularStorage"; +import type { ClientProvidedKeysOption } from "./BaseTabularStorage"; +import { BaseTabularStorage } from "./BaseTabularStorage"; import type { AnyTabularStorage, AutoGeneratedKeys, diff --git a/packages/storage/src/tabular/HuggingFaceTabularStorage.ts b/packages/storage/src/tabular/HuggingFaceTabularStorage.ts index 595dd07d9..5c56c72db 100644 --- a/packages/storage/src/tabular/HuggingFaceTabularStorage.ts +++ b/packages/storage/src/tabular/HuggingFaceTabularStorage.ts @@ -5,18 +5,22 @@ */ import { createServiceToken } from "@workglow/util"; -import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import type { + DataPortSchemaObject, + FromSchema, + TypedArraySchemaOptions, +} from "@workglow/util/schema"; import { safeEmit } from "../events/safeEmit"; import { type ITabularMigration, type ITabularMigrationApplier } from "../migrations"; import { BaseTabularStorage } from "./BaseTabularStorage"; -import { decodeCursor, encodeCursor, PageCursor } from "./Cursor"; +import type { PageCursor } from "./Cursor"; +import { decodeCursor, encodeCursor } from "./Cursor"; import { InMemoryTabularMigrationApplier } from "./InMemoryTabularMigrationApplier"; -import { +import type { AnyTabularStorage, AutoGeneratedKeys, DeleteSearchCriteria, InsertEntity, - normalizeCriterion, Page, PageRequest, QueryOptions, @@ -25,6 +29,7 @@ import { TabularChangePayload, TabularSubscribeOptions, } from "./ITabularStorage"; +import { normalizeCriterion } from "./ITabularStorage"; import { StorageUnsupportedError, StorageValidationError } from "./StorageError"; export const HF_TABULAR_REPOSITORY = createServiceToken( diff --git a/packages/storage/src/tabular/ITabularStorage.ts b/packages/storage/src/tabular/ITabularStorage.ts index f744dc869..28e6a7774 100644 --- a/packages/storage/src/tabular/ITabularStorage.ts +++ b/packages/storage/src/tabular/ITabularStorage.ts @@ -4,8 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EventParameters } from "@workglow/util"; -import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import type { EventParameters } from "@workglow/util"; +import type { + DataPortSchemaObject, + FromSchema, + TypedArraySchemaOptions, +} from "@workglow/util/schema"; import type { PageCursor } from "./Cursor"; export type { PageCursor } from "./Cursor"; diff --git a/packages/storage/src/tabular/InMemoryTabularStorage.ts b/packages/storage/src/tabular/InMemoryTabularStorage.ts index 042d1a8e5..a697b0b02 100644 --- a/packages/storage/src/tabular/InMemoryTabularStorage.ts +++ b/packages/storage/src/tabular/InMemoryTabularStorage.ts @@ -5,29 +5,30 @@ */ import { createServiceToken, makeFingerprint, uuid4 } from "@workglow/util"; -import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import type { + DataPortSchemaObject, + FromSchema, + TypedArraySchemaOptions, +} from "@workglow/util/schema"; import { safeEmit } from "../events/safeEmit"; import { type ITabularMigration, type ITabularMigrationApplier } from "../migrations"; -import { - BaseTabularStorage, - ClientProvidedKeysOption, - KeyGenerationStrategy, -} from "./BaseTabularStorage"; +import type { ClientProvidedKeysOption, KeyGenerationStrategy } from "./BaseTabularStorage"; +import { BaseTabularStorage } from "./BaseTabularStorage"; import { pickCoveringIndex } from "./coveringIndexPicker"; import { InMemoryTabularMigrationApplier } from "./InMemoryTabularMigrationApplier"; -import { +import type { AnyTabularStorage, AutoGeneratedKeys, CoveringIndexQueryOptions, DeleteSearchCriteria, InsertEntity, - normalizeCriterion, QueryOptions, SearchCriteria, SimplifyPrimaryKey, TabularChangePayload, TabularSubscribeOptions, } from "./ITabularStorage"; +import { normalizeCriterion } from "./ITabularStorage"; import { StorageError } from "./StorageError"; export const MEMORY_TABULAR_REPOSITORY = createServiceToken( diff --git a/packages/storage/src/tabular/SharedInMemoryTabularStorage.ts b/packages/storage/src/tabular/SharedInMemoryTabularStorage.ts index d85b006bf..30e1900aa 100644 --- a/packages/storage/src/tabular/SharedInMemoryTabularStorage.ts +++ b/packages/storage/src/tabular/SharedInMemoryTabularStorage.ts @@ -5,11 +5,16 @@ */ import { createServiceToken, DEFAULT_LIMITS, getLogger } from "@workglow/util"; -import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import type { + DataPortSchemaObject, + FromSchema, + TypedArraySchemaOptions, +} from "@workglow/util/schema"; import { safeEmit } from "../events/safeEmit"; import { type ITabularMigration, type ITabularMigrationApplier } from "../migrations"; -import { BaseTabularStorage, ClientProvidedKeysOption } from "./BaseTabularStorage"; -import { +import type { ClientProvidedKeysOption } from "./BaseTabularStorage"; +import { BaseTabularStorage } from "./BaseTabularStorage"; +import type { AnyTabularStorage, AutoGeneratedKeys, CoveringIndexQueryOptions, diff --git a/packages/storage/src/tabular/TabularStorageRegistry.ts b/packages/storage/src/tabular/TabularStorageRegistry.ts index 06cf09ae3..590b91566 100644 --- a/packages/storage/src/tabular/TabularStorageRegistry.ts +++ b/packages/storage/src/tabular/TabularStorageRegistry.ts @@ -4,14 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { ServiceRegistry } from "@workglow/util"; import { createServiceToken, globalServiceRegistry, registerInputCompactor, registerInputResolver, - ServiceRegistry, } from "@workglow/util"; -import { AnyTabularStorage } from "./ITabularStorage"; +import type { AnyTabularStorage } from "./ITabularStorage"; export const TABULAR_REPOSITORIES = createServiceToken>( "storage.tabular.repositories" diff --git a/packages/task-graph/src/storage/RunPrivateTaskOutputRepository.ts b/packages/task-graph/src/storage/RunPrivateTaskOutputRepository.ts index 153baef81..4d6f85830 100644 --- a/packages/task-graph/src/storage/RunPrivateTaskOutputRepository.ts +++ b/packages/task-graph/src/storage/RunPrivateTaskOutputRepository.ts @@ -7,7 +7,7 @@ import type { ITabularStorage, PageCursor } from "@workglow/storage"; import { makeFingerprint } from "@workglow/util"; import type { TaskInput, TaskOutput } from "../task/TaskTypes"; -import { +import type { RunPrivateTaskOutputPrimaryKeyNames, RunPrivateTaskOutputSchema, } from "./RunPrivateTaskOutputSchema"; diff --git a/packages/task-graph/src/storage/TabularTaskOutputStorage.ts b/packages/task-graph/src/storage/TabularTaskOutputStorage.ts index cb776fa10..b52b7e775 100644 --- a/packages/task-graph/src/storage/TabularTaskOutputStorage.ts +++ b/packages/task-graph/src/storage/TabularTaskOutputStorage.ts @@ -11,7 +11,7 @@ import type { TaskOutputRow, TaskOutputRowPrimaryKey, } from "./ITaskOutputStorage"; -import { TaskOutputPrimaryKeyNames, TaskOutputSchema } from "./TaskOutputStorageSchema"; +import type { TaskOutputPrimaryKeyNames, TaskOutputSchema } from "./TaskOutputStorageSchema"; type TaskOutputTabularBacking = ITabularStorage< typeof TaskOutputSchema, diff --git a/packages/task-graph/src/storage/TaskGraphRepository.ts b/packages/task-graph/src/storage/TaskGraphRepository.ts index 133a20a18..d809d0690 100644 --- a/packages/task-graph/src/storage/TaskGraphRepository.ts +++ b/packages/task-graph/src/storage/TaskGraphRepository.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { createServiceToken, EventEmitter, EventParameters } from "@workglow/util"; -import { TaskGraph } from "../task-graph/TaskGraph"; +import type { EventParameters } from "@workglow/util"; +import { createServiceToken, EventEmitter } from "@workglow/util"; +import type { TaskGraph } from "../task-graph/TaskGraph"; /** * Service token for TaskGraphRepository diff --git a/packages/task-graph/src/storage/TaskGraphTabularRepository.ts b/packages/task-graph/src/storage/TaskGraphTabularRepository.ts index 5ff99866a..376303cf7 100644 --- a/packages/task-graph/src/storage/TaskGraphTabularRepository.ts +++ b/packages/task-graph/src/storage/TaskGraphTabularRepository.ts @@ -6,8 +6,8 @@ import type { BaseTabularStorage } from "@workglow/storage"; import type { ServiceRegistry } from "@workglow/util"; -import { DataPortSchemaObject } from "@workglow/util/schema"; -import { TaskGraph } from "../task-graph/TaskGraph"; +import type { DataPortSchemaObject } from "@workglow/util/schema"; +import type { TaskGraph } from "../task-graph/TaskGraph"; import { createGraphFromGraphJSON } from "../task/TaskJSON"; import { TaskGraphRepository } from "./TaskGraphRepository"; diff --git a/packages/task-graph/src/storage/TaskOutputRepository.ts b/packages/task-graph/src/storage/TaskOutputRepository.ts index 54a304e93..f4cb854a7 100644 --- a/packages/task-graph/src/storage/TaskOutputRepository.ts +++ b/packages/task-graph/src/storage/TaskOutputRepository.ts @@ -4,10 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { createServiceToken, EventEmitter, EventParameters } from "@workglow/util"; +import type { EventParameters } from "@workglow/util"; +import { createServiceToken, EventEmitter } from "@workglow/util"; import type { CacheRef } from "../cache/CacheRef"; import type { StreamMode } from "../task/StreamTypes"; -import { TaskInput, TaskOutput } from "../task/TaskTypes"; +import type { TaskInput, TaskOutput } from "../task/TaskTypes"; export const TASK_OUTPUT_REPOSITORY = createServiceToken( "taskgraph.taskOutputRepository" diff --git a/packages/task-graph/src/storage/TaskOutputTabularRepository.ts b/packages/task-graph/src/storage/TaskOutputTabularRepository.ts index 58ed468a2..1ddc9511c 100644 --- a/packages/task-graph/src/storage/TaskOutputTabularRepository.ts +++ b/packages/task-graph/src/storage/TaskOutputTabularRepository.ts @@ -5,7 +5,7 @@ */ import { makeFingerprint } from "@workglow/util"; -import { TaskInput, TaskOutput } from "../task/TaskTypes"; +import type { TaskInput, TaskOutput } from "../task/TaskTypes"; import type { ITaskOutputStorage } from "./ITaskOutputStorage"; import type { TaskOutputTabularBacking } from "./TabularTaskOutputStorage"; import { decodeTaskOutput, encodeTaskOutput } from "./taskOutputCodec"; diff --git a/packages/task-graph/src/task-graph/Dataflow.ts b/packages/task-graph/src/task-graph/Dataflow.ts index 043ceec8a..071e2446f 100644 --- a/packages/task-graph/src/task-graph/Dataflow.ts +++ b/packages/task-graph/src/task-graph/Dataflow.ts @@ -8,17 +8,18 @@ import type { ServiceRegistry } from "@workglow/util"; import { EventEmitter } from "@workglow/util"; import { areSemanticallyCompatible } from "@workglow/util/schema"; import type { StreamEvent } from "../task/StreamTypes"; -import { Task } from "../task/Task"; +import type { Task } from "../task/Task"; import { TaskError } from "../task/TaskError"; import type { DataflowJson } from "../task/TaskJSON"; -import { TaskIdType, TaskOutput, TaskStatus } from "../task/TaskTypes"; -import { +import type { TaskIdType, TaskOutput } from "../task/TaskTypes"; +import { TaskStatus } from "../task/TaskTypes"; +import type { DataflowEventListener, DataflowEventListeners, DataflowEventParameters, DataflowEvents, } from "./DataflowEvents"; -import { TaskGraph } from "./TaskGraph"; +import type { TaskGraph } from "./TaskGraph"; import { TRANSFORM_DEFS, TransformRegistry } from "./TransformRegistry"; import type { ITransformStep } from "./TransformTypes"; diff --git a/packages/task-graph/src/task-graph/DataflowEvents.ts b/packages/task-graph/src/task-graph/DataflowEvents.ts index 3fca1007e..571ae1f9f 100644 --- a/packages/task-graph/src/task-graph/DataflowEvents.ts +++ b/packages/task-graph/src/task-graph/DataflowEvents.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EventParameters } from "@workglow/util"; -import { TaskError } from "../task/TaskError"; -import { TaskStatus } from "../task/TaskTypes"; +import type { EventParameters } from "@workglow/util"; +import type { TaskError } from "../task/TaskError"; +import type { TaskStatus } from "../task/TaskTypes"; /** * Event listeners for dataflow events diff --git a/packages/task-graph/src/task-graph/GraphSchemaUtils.ts b/packages/task-graph/src/task-graph/GraphSchemaUtils.ts index 40fc570b5..93de8deb8 100644 --- a/packages/task-graph/src/task-graph/GraphSchemaUtils.ts +++ b/packages/task-graph/src/task-graph/GraphSchemaUtils.ts @@ -7,7 +7,7 @@ import { uuid4 } from "@workglow/util"; import type { DataPortSchema, JsonSchema } from "@workglow/util/schema"; import type { ITask } from "../task/ITask"; -import { Task } from "../task/Task"; +import type { Task } from "../task/Task"; import type { DataflowJson, JsonTaskItem, diff --git a/packages/task-graph/src/task-graph/GraphToWorkflowCode.ts b/packages/task-graph/src/task-graph/GraphToWorkflowCode.ts index 90863f591..98ebf9881 100644 --- a/packages/task-graph/src/task-graph/GraphToWorkflowCode.ts +++ b/packages/task-graph/src/task-graph/GraphToWorkflowCode.ts @@ -5,7 +5,7 @@ */ import type { ITask } from "../task/ITask"; -import { Task } from "../task/Task"; +import type { Task } from "../task/Task"; import type { TaskIdType } from "../task/TaskTypes"; import { DATAFLOW_ALL_PORTS, DATAFLOW_ERROR_PORT } from "./Dataflow"; import type { TaskGraph } from "./TaskGraph"; diff --git a/packages/task-graph/src/task-graph/ITaskGraph.ts b/packages/task-graph/src/task-graph/ITaskGraph.ts index 0c1fc2cec..315731e3a 100644 --- a/packages/task-graph/src/task-graph/ITaskGraph.ts +++ b/packages/task-graph/src/task-graph/ITaskGraph.ts @@ -4,14 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ITask } from "../task/ITask"; +import type { ITask } from "../task/ITask"; import type { StreamEvent } from "../task/StreamTypes"; -import { JsonTaskItem, TaskGraphJson, TaskGraphJsonOptions } from "../task/TaskJSON"; +import type { JsonTaskItem, TaskGraphJson, TaskGraphJsonOptions } from "../task/TaskJSON"; import type { TaskIdType, TaskInput, TaskOutput, TaskStatus } from "../task/TaskTypes"; -import { Dataflow, DataflowIdType } from "./Dataflow"; +import type { Dataflow, DataflowIdType } from "./Dataflow"; import type { TaskGraphRunConfig } from "./TaskGraph"; import type { TaskGraphEventListener, TaskGraphEvents } from "./TaskGraphEvents"; -import { +import type { CompoundMergeStrategy, GraphResult, GraphResultArray, diff --git a/packages/task-graph/src/task-graph/IWorkflow.ts b/packages/task-graph/src/task-graph/IWorkflow.ts index ac44c1a22..8ad8c5e3e 100644 --- a/packages/task-graph/src/task-graph/IWorkflow.ts +++ b/packages/task-graph/src/task-graph/IWorkflow.ts @@ -5,9 +5,9 @@ */ import type { ResourceScope, ServiceRegistry } from "@workglow/util"; -import { TaskInput, TaskOutput } from "../task/TaskTypes"; -import { TaskGraph } from "./TaskGraph"; -import { GraphResult, PROPERTY_ARRAY } from "./TaskGraphRunner"; +import type { TaskInput, TaskOutput } from "../task/TaskTypes"; +import type { TaskGraph } from "./TaskGraph"; +import type { GraphResult, PROPERTY_ARRAY } from "./TaskGraphRunner"; export interface WorkflowRunConfig { /** Optional service registry to use for this workflow run */ diff --git a/packages/task-graph/src/task-graph/StreamPump.ts b/packages/task-graph/src/task-graph/StreamPump.ts index f22fb1845..d21fb8e42 100644 --- a/packages/task-graph/src/task-graph/StreamPump.ts +++ b/packages/task-graph/src/task-graph/StreamPump.ts @@ -24,7 +24,8 @@ import { } from "../task/StreamTypes"; import type { TaskIdType, TaskInput } from "../task/TaskTypes"; import { TaskStatus } from "../task/TaskTypes"; -import { Dataflow, DATAFLOW_ALL_PORTS } from "./Dataflow"; +import type { Dataflow } from "./Dataflow"; +import { DATAFLOW_ALL_PORTS } from "./Dataflow"; import type { EdgeMaterializer } from "./EdgeMaterializer"; import type { RunContext } from "./RunContext"; import type { RunScheduler } from "./RunScheduler"; diff --git a/packages/task-graph/src/task-graph/TaskGraph.ts b/packages/task-graph/src/task-graph/TaskGraph.ts index d4cfd7e71..b2775605f 100644 --- a/packages/task-graph/src/task-graph/TaskGraph.ts +++ b/packages/task-graph/src/task-graph/TaskGraph.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { IDisposeStrategy, ResourceScope } from "@workglow/util"; -import { EventEmitter, ServiceRegistry, uuid4 } from "@workglow/util"; +import type { IDisposeStrategy, ResourceScope, ServiceRegistry } from "@workglow/util"; +import { EventEmitter, uuid4 } from "@workglow/util"; import { DirectedAcyclicGraph } from "@workglow/util/graph"; -import { TaskOutputRepository } from "../storage/TaskOutputRepository"; +import type { TaskOutputRepository } from "../storage/TaskOutputRepository"; import type { ITask } from "../task/ITask"; import type { StreamEvent } from "../task/StreamTypes"; import type { TaskEntitlements } from "../task/TaskEntitlements"; @@ -20,8 +20,7 @@ import { Dataflow, DataflowArrow } from "./Dataflow"; import { computeGraphEntitlements } from "./GraphEntitlementUtils"; import { addBoundaryNodesToDependencyJson, addBoundaryNodesToGraphJson } from "./GraphSchemaUtils"; import type { ITaskGraph } from "./ITaskGraph"; -import { - EventTaskGraphToDagMapping, +import type { GraphEventDagEvents, GraphEventDagParameters, TaskGraphEventListener, @@ -30,8 +29,9 @@ import { TaskGraphStatusEvents, TaskGraphStatusListeners, } from "./TaskGraphEvents"; -import type { GraphResultArray } from "./TaskGraphRunner"; -import { CompoundMergeStrategy, GraphResult, TaskGraphRunner } from "./TaskGraphRunner"; +import { EventTaskGraphToDagMapping } from "./TaskGraphEvents"; +import type { CompoundMergeStrategy, GraphResult, GraphResultArray } from "./TaskGraphRunner"; +import { TaskGraphRunner } from "./TaskGraphRunner"; /** * Configuration for running a task graph diff --git a/packages/task-graph/src/task-graph/TaskGraphEvents.ts b/packages/task-graph/src/task-graph/TaskGraphEvents.ts index 5e18f29b8..a25f984eb 100644 --- a/packages/task-graph/src/task-graph/TaskGraphEvents.ts +++ b/packages/task-graph/src/task-graph/TaskGraphEvents.ts @@ -4,11 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EventParameters } from "@workglow/util"; +import type { EventParameters } from "@workglow/util"; import type { StreamEvent } from "../task/StreamTypes"; import type { TaskEntitlements } from "../task/TaskEntitlements"; -import { TaskIdType } from "../task/TaskTypes"; -import { DataflowIdType } from "./Dataflow"; +import type { TaskIdType } from "../task/TaskTypes"; +import type { DataflowIdType } from "./Dataflow"; /** * Events that can be emitted by the TaskGraph diff --git a/packages/task-graph/src/task-graph/TaskGraphRunner.ts b/packages/task-graph/src/task-graph/TaskGraphRunner.ts index 51e101c3d..7c93c9099 100644 --- a/packages/task-graph/src/task-graph/TaskGraphRunner.ts +++ b/packages/task-graph/src/task-graph/TaskGraphRunner.ts @@ -4,10 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { ISpan } from "@workglow/util"; +import type { ConvertAllToOptionalArray, ISpan } from "@workglow/util"; import { collectPropertyValues, - ConvertAllToOptionalArray, getLogger, getTelemetryProvider, globalServiceRegistry, @@ -18,24 +17,22 @@ import { } from "@workglow/util"; import { CACHE_REGISTRY, DefaultCacheRegistry } from "../cache/CacheRegistry"; import { RunPrivateCacheRepo } from "../cache/RunPrivateCacheRepo"; -import { TASK_OUTPUT_REPOSITORY, TaskOutputRepository } from "../storage/TaskOutputRepository"; +import type { TaskOutputRepository } from "../storage/TaskOutputRepository"; +import { TASK_OUTPUT_REPOSITORY } from "../storage/TaskOutputRepository"; import { ENTITLEMENT_ENFORCER, formatEntitlementDenial } from "../task/EntitlementEnforcer"; -import { ITask } from "../task/ITask"; +import type { ITask } from "../task/ITask"; import { isTaskStreamable } from "../task/StreamTypes"; import { Task } from "../task/Task"; -import { - TaskAbortedError, - TaskConfigurationError, - TaskEntitlementError, - TaskError, -} from "../task/TaskError"; -import { TaskInput, TaskOutput, TaskStatus } from "../task/TaskTypes"; +import type { TaskError } from "../task/TaskError"; +import { TaskAbortedError, TaskConfigurationError, TaskEntitlementError } from "../task/TaskError"; +import type { TaskInput, TaskOutput } from "../task/TaskTypes"; +import { TaskStatus } from "../task/TaskTypes"; import { EdgeMaterializer } from "./EdgeMaterializer"; import { computeGraphEntitlements } from "./GraphEntitlementUtils"; import { RunContext } from "./RunContext"; import { RunScheduler } from "./RunScheduler"; import { StreamPump } from "./StreamPump"; -import { TaskGraph, TaskGraphRunConfig, TaskGraphRunPreviewConfig } from "./TaskGraph"; +import type { TaskGraph, TaskGraphRunConfig, TaskGraphRunPreviewConfig } from "./TaskGraph"; import { DependencyBasedScheduler, TopologicalScheduler } from "./TaskGraphScheduler"; /** diff --git a/packages/task-graph/src/task-graph/TaskGraphScheduler.ts b/packages/task-graph/src/task-graph/TaskGraphScheduler.ts index 45dce73ef..525b44f59 100644 --- a/packages/task-graph/src/task-graph/TaskGraphScheduler.ts +++ b/packages/task-graph/src/task-graph/TaskGraphScheduler.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ITask } from "../task/ITask"; +import type { ITask } from "../task/ITask"; import { getPortStreamMode } from "../task/StreamTypes"; import { TaskStatus } from "../task/TaskTypes"; -import { TaskGraph } from "./TaskGraph"; +import type { TaskGraph } from "./TaskGraph"; /** * Interface for task graph schedulers diff --git a/packages/task-graph/src/task-graph/TransformRegistry.ts b/packages/task-graph/src/task-graph/TransformRegistry.ts index 372bb0886..c1c152345 100644 --- a/packages/task-graph/src/task-graph/TransformRegistry.ts +++ b/packages/task-graph/src/task-graph/TransformRegistry.ts @@ -3,7 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { createServiceToken, globalServiceRegistry, ServiceRegistry } from "@workglow/util"; +import type { ServiceRegistry } from "@workglow/util"; +import { createServiceToken, globalServiceRegistry } from "@workglow/util"; import type { ITransformDef } from "./TransformTypes"; const transformDefs = new Map>(); diff --git a/packages/task-graph/src/task-graph/Workflow.ts b/packages/task-graph/src/task-graph/Workflow.ts index 9dfd2018d..df3cf85ee 100644 --- a/packages/task-graph/src/task-graph/Workflow.ts +++ b/packages/task-graph/src/task-graph/Workflow.ts @@ -4,14 +4,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { EventParameters } from "@workglow/util"; -import { EventEmitter, ServiceRegistry } from "@workglow/util"; +import type { EventParameters, ServiceRegistry } from "@workglow/util"; +import { EventEmitter } from "@workglow/util"; import type { TaskOutputRepository } from "../storage/TaskOutputRepository"; import type { ConditionFn } from "../task/ConditionalTask"; import { GraphAsTask } from "../task/GraphAsTask"; import type { IRunConfig, ITask, ITaskConstructor } from "../task/ITask"; import type { StreamEvent } from "../task/StreamTypes"; -import { Task } from "../task/Task"; +import type { Task } from "../task/Task"; import type { TaskEntitlements } from "../task/TaskEntitlements"; import { TaskAbortedError, WorkflowError } from "../task/TaskError"; import type { JsonTaskItem, TaskGraphJson, TaskGraphJsonOptions } from "../task/TaskJSON"; @@ -24,8 +24,8 @@ import { computeGraphEntitlements } from "./GraphEntitlementUtils"; import type { IWorkflow, WorkflowRunConfig } from "./IWorkflow"; import { LoopBuilderContext, runLoopAutoConnect } from "./LoopBuilderContext"; import { TaskGraph } from "./TaskGraph"; -import type { PropertyArrayGraphResult } from "./TaskGraphRunner"; -import { CompoundMergeStrategy, PROPERTY_ARRAY } from "./TaskGraphRunner"; +import type { CompoundMergeStrategy, PropertyArrayGraphResult } from "./TaskGraphRunner"; +import { PROPERTY_ARRAY } from "./TaskGraphRunner"; import type { ITransformStep } from "./TransformTypes"; import type { IWorkflowBuilderHandle } from "./WorkflowBuilder"; import { WorkflowBuilder } from "./WorkflowBuilder"; diff --git a/packages/task-graph/src/task-graph/WorkflowBuilder.ts b/packages/task-graph/src/task-graph/WorkflowBuilder.ts index a1ec4f797..80f0011de 100644 --- a/packages/task-graph/src/task-graph/WorkflowBuilder.ts +++ b/packages/task-graph/src/task-graph/WorkflowBuilder.ts @@ -4,10 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { getLogger, ServiceRegistry, uuid4 } from "@workglow/util"; +import type { ServiceRegistry } from "@workglow/util"; +import { getLogger, uuid4 } from "@workglow/util"; import type { DataPortSchema } from "@workglow/util/schema"; import type { ConditionFn } from "../task/ConditionalTask"; -import { GraphAsTask } from "../task/GraphAsTask"; +import type { GraphAsTask } from "../task/GraphAsTask"; import type { IRunConfig, ITask, ITaskConstructor } from "../task/ITask"; import { WorkflowError } from "../task/TaskError"; import type { DataPorts, TaskConfig, TaskInput } from "../task/TaskTypes"; @@ -17,7 +18,7 @@ import type { Taskish } from "./Conversions"; import { ensureTask } from "./Conversions"; import { Dataflow, DATAFLOW_ALL_PORTS, DATAFLOW_ERROR_PORT } from "./Dataflow"; import { updateBoundaryTaskSchemas } from "./GraphSchemaUtils"; -import { LoopBuilderContext } from "./LoopBuilderContext"; +import type { LoopBuilderContext } from "./LoopBuilderContext"; import type { RenameOptions, Workflow } from "./Workflow"; import { getLastTask } from "./WorkflowPipe"; diff --git a/packages/task-graph/src/task-graph/autoConnect.ts b/packages/task-graph/src/task-graph/autoConnect.ts index 05413c3b6..8d1d179a7 100644 --- a/packages/task-graph/src/task-graph/autoConnect.ts +++ b/packages/task-graph/src/task-graph/autoConnect.ts @@ -7,7 +7,7 @@ import type { JsonSchema } from "@workglow/util/schema"; import type { ITask } from "../task/ITask"; import { getPortStreamMode } from "../task/StreamTypes"; -import { Task } from "../task/Task"; +import type { Task } from "../task/Task"; import { Dataflow, DATAFLOW_ALL_PORTS } from "./Dataflow"; import type { TaskGraph } from "./TaskGraph"; diff --git a/packages/task-graph/src/task/FallbackTask.ts b/packages/task-graph/src/task/FallbackTask.ts index 6a24e2d71..40a3b3540 100644 --- a/packages/task-graph/src/task/FallbackTask.ts +++ b/packages/task-graph/src/task/FallbackTask.ts @@ -6,7 +6,8 @@ import type { DataPortSchema } from "@workglow/util/schema"; import { Workflow } from "../task-graph/Workflow"; -import { CreateEndLoopWorkflow, CreateLoopWorkflow } from "../task-graph/WorkflowFactories"; +import type { CreateLoopWorkflow } from "../task-graph/WorkflowFactories"; +import { CreateEndLoopWorkflow } from "../task-graph/WorkflowFactories"; import { FallbackTaskRunner } from "./FallbackTaskRunner"; import type { GraphAsTaskConfig } from "./GraphAsTask"; import { GraphAsTask, graphAsTaskConfigSchema } from "./GraphAsTask"; diff --git a/packages/task-graph/src/task/GraphAsTask.ts b/packages/task-graph/src/task/GraphAsTask.ts index ebcabfc07..8b429e4f5 100644 --- a/packages/task-graph/src/task/GraphAsTask.ts +++ b/packages/task-graph/src/task/GraphAsTask.ts @@ -12,8 +12,9 @@ import { registerGraphWrapperFactory } from "../task-graph/Conversions"; import { computeGraphEntitlements } from "../task-graph/GraphEntitlementUtils"; import { computeGraphInputSchema, computeGraphOutputSchema } from "../task-graph/GraphSchemaUtils"; import { bridgeSubGraphTaskEvents } from "../task-graph/SubGraphEventBridge"; -import { TaskGraph } from "../task-graph/TaskGraph"; -import { CompoundMergeStrategy, PROPERTY_ARRAY } from "../task-graph/TaskGraphRunner"; +import type { TaskGraph } from "../task-graph/TaskGraph"; +import type { CompoundMergeStrategy } from "../task-graph/TaskGraphRunner"; +import { PROPERTY_ARRAY } from "../task-graph/TaskGraphRunner"; import type { CreateLoopWorkflow } from "../task-graph/WorkflowFactories"; import { GraphAsTaskRunner } from "./GraphAsTaskRunner"; import type { IExecuteContext, IRunConfig } from "./ITask"; diff --git a/packages/task-graph/src/task/GraphAsTaskRunner.ts b/packages/task-graph/src/task/GraphAsTaskRunner.ts index 2021e5cd9..167c83d6e 100644 --- a/packages/task-graph/src/task/GraphAsTaskRunner.ts +++ b/packages/task-graph/src/task/GraphAsTaskRunner.ts @@ -5,9 +5,8 @@ */ import { bridgeSubGraphTaskEvents } from "../task-graph/SubGraphEventBridge"; -import { GraphResultArray } from "../task-graph/TaskGraphRunner"; -import type { GraphAsTaskConfig } from "./GraphAsTask"; -import { GraphAsTask } from "./GraphAsTask"; +import type { GraphResultArray } from "../task-graph/TaskGraphRunner"; +import type { GraphAsTask, GraphAsTaskConfig } from "./GraphAsTask"; import type { TaskRunContext } from "./TaskRunContext"; import { TaskRunner } from "./TaskRunner"; import type { TaskInput, TaskOutput } from "./TaskTypes"; diff --git a/packages/task-graph/src/task/ITask.ts b/packages/task-graph/src/task/ITask.ts index 91b70b8ae..f26e873e3 100644 --- a/packages/task-graph/src/task/ITask.ts +++ b/packages/task-graph/src/task/ITask.ts @@ -12,14 +12,14 @@ import type { } from "@workglow/util"; import type { DataPortSchema } from "@workglow/util/schema"; import type { CachePolicy } from "../cache/CachePolicy"; -import { TaskOutputRepository } from "../storage/TaskOutputRepository"; -import { ITaskGraph } from "../task-graph/ITaskGraph"; -import { IWorkflow } from "../task-graph/IWorkflow"; +import type { TaskOutputRepository } from "../storage/TaskOutputRepository"; +import type { ITaskGraph } from "../task-graph/ITaskGraph"; +import type { IWorkflow } from "../task-graph/IWorkflow"; import type { TaskGraph } from "../task-graph/TaskGraph"; -import { CompoundMergeStrategy } from "../task-graph/TaskGraphRunner"; +import type { CompoundMergeStrategy } from "../task-graph/TaskGraphRunner"; import type { StreamEvent } from "./StreamTypes"; import type { TaskEntitlements } from "./TaskEntitlements"; -import { TaskError } from "./TaskError"; +import type { TaskError } from "./TaskError"; import type { TaskEventListener, TaskEventListeners, @@ -27,7 +27,7 @@ import type { TaskEvents, } from "./TaskEvents"; import type { JsonTaskItem, TaskGraphItemJson, TaskGraphJsonOptions } from "./TaskJSON"; -import { TaskRunner } from "./TaskRunner"; +import type { TaskRunner } from "./TaskRunner"; import type { TaskConfig, TaskInput, TaskOutput, TaskStatus } from "./TaskTypes"; export interface IExecuteContext { diff --git a/packages/task-graph/src/task/IteratorTask.ts b/packages/task-graph/src/task/IteratorTask.ts index 136c02473..ed32d6719 100644 --- a/packages/task-graph/src/task/IteratorTask.ts +++ b/packages/task-graph/src/task/IteratorTask.ts @@ -5,7 +5,7 @@ */ import type { DataPortSchema, PropertySchema } from "@workglow/util/schema"; -import { TaskGraph } from "../task-graph/TaskGraph"; +import type { TaskGraph } from "../task-graph/TaskGraph"; import type { GraphAsTaskConfig } from "./GraphAsTask"; import { GraphAsTask, graphAsTaskConfigSchema } from "./GraphAsTask"; import type { IExecuteContext, IRunConfig } from "./ITask"; diff --git a/packages/task-graph/src/task/JobQueueFactory.ts b/packages/task-graph/src/task/JobQueueFactory.ts index 38ac5eb97..d4fa92b84 100644 --- a/packages/task-graph/src/task/JobQueueFactory.ts +++ b/packages/task-graph/src/task/JobQueueFactory.ts @@ -4,14 +4,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { IQueueStorage } from "@workglow/job-queue"; -import { - InMemoryQueueStorage, +import type { + IQueueStorage, Job, JobConstructorParam, + JobQueueServerOptions, +} from "@workglow/job-queue"; +import { + InMemoryQueueStorage, JobQueueClient, JobQueueServer, - JobQueueServerOptions, wrapQueueStorage, } from "@workglow/job-queue"; import { createServiceToken, globalServiceRegistry } from "@workglow/util"; diff --git a/packages/task-graph/src/task/MapTask.ts b/packages/task-graph/src/task/MapTask.ts index 87db79cef..31082905f 100644 --- a/packages/task-graph/src/task/MapTask.ts +++ b/packages/task-graph/src/task/MapTask.ts @@ -9,7 +9,8 @@ import { PROPERTY_ARRAY } from "../task-graph/TaskGraphRunner"; import { Workflow } from "../task-graph/Workflow"; import { CreateEndLoopWorkflow, CreateLoopWorkflow } from "../task-graph/WorkflowFactories"; import type { IRunConfig } from "./ITask"; -import { IteratorTask, IteratorTaskConfig, iteratorTaskConfigSchema } from "./IteratorTask"; +import type { IteratorTaskConfig } from "./IteratorTask"; +import { IteratorTask, iteratorTaskConfigSchema } from "./IteratorTask"; import type { TaskInput, TaskOutput, TaskTypeName } from "./TaskTypes"; export const mapTaskConfigSchema = { type: "object", diff --git a/packages/task-graph/src/task/ReduceTask.ts b/packages/task-graph/src/task/ReduceTask.ts index f5fee2663..62bb0d6ef 100644 --- a/packages/task-graph/src/task/ReduceTask.ts +++ b/packages/task-graph/src/task/ReduceTask.ts @@ -8,12 +8,8 @@ import type { DataPortSchema } from "@workglow/util/schema"; import { Workflow } from "../task-graph/Workflow"; import { CreateEndLoopWorkflow, CreateLoopWorkflow } from "../task-graph/WorkflowFactories"; import type { IRunConfig } from "./ITask"; -import { - IterationAnalysisResult, - IteratorTask, - IteratorTaskConfig, - iteratorTaskConfigSchema, -} from "./IteratorTask"; +import type { IterationAnalysisResult, IteratorTaskConfig } from "./IteratorTask"; +import { IteratorTask, iteratorTaskConfigSchema } from "./IteratorTask"; import type { TaskInput, TaskOutput, TaskTypeName } from "./TaskTypes"; export const reduceTaskConfigSchema = { diff --git a/packages/task-graph/src/task/Task.ts b/packages/task-graph/src/task/Task.ts index 324b14e82..6f56c880f 100644 --- a/packages/task-graph/src/task/Task.ts +++ b/packages/task-graph/src/task/Task.ts @@ -13,10 +13,10 @@ import { DATAFLOW_ALL_PORTS } from "../task-graph/Dataflow"; import { TaskGraph } from "../task-graph/TaskGraph"; import type { IExecuteContext, IExecutePreviewContext, IRunConfig, ITask } from "./ITask"; import { EMPTY_ENTITLEMENTS, type TaskEntitlements } from "./TaskEntitlements"; +import type { TaskError } from "./TaskError"; import { TaskAbortedError, TaskConfigurationError, - TaskError, TaskInvalidInputError, TaskSerializationError, } from "./TaskError"; diff --git a/packages/task-graph/src/task/TaskError.ts b/packages/task-graph/src/task/TaskError.ts index 500ecc597..5b9574da9 100644 --- a/packages/task-graph/src/task/TaskError.ts +++ b/packages/task-graph/src/task/TaskError.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { JobError } from "@workglow/job-queue"; +import type { JobError } from "@workglow/job-queue"; import { BaseError } from "@workglow/util"; export class TaskError extends BaseError { diff --git a/packages/task-graph/src/task/TaskEvents.ts b/packages/task-graph/src/task/TaskEvents.ts index bab9450ac..7cd489f83 100644 --- a/packages/task-graph/src/task/TaskEvents.ts +++ b/packages/task-graph/src/task/TaskEvents.ts @@ -4,12 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EventParameters } from "@workglow/util"; +import type { EventParameters } from "@workglow/util"; import type { DataPortSchema } from "@workglow/util/schema"; import type { StreamEvent } from "./StreamTypes"; import type { TaskEntitlements } from "./TaskEntitlements"; -import { TaskAbortedError, TaskError } from "./TaskError"; -import { TaskStatus } from "./TaskTypes"; +import type { TaskAbortedError, TaskError } from "./TaskError"; +import type { TaskStatus } from "./TaskTypes"; // ======================================================================== // Event Handling Types diff --git a/packages/task-graph/src/task/TaskJSON.ts b/packages/task-graph/src/task/TaskJSON.ts index 1e9ad0d9d..efc03395a 100644 --- a/packages/task-graph/src/task/TaskJSON.ts +++ b/packages/task-graph/src/task/TaskJSON.ts @@ -7,17 +7,18 @@ import type { ServiceRegistry } from "@workglow/util"; import { Dataflow } from "../task-graph/Dataflow"; import { TaskGraph } from "../task-graph/TaskGraph"; -import { CompoundMergeStrategy } from "../task-graph/TaskGraphRunner"; +import type { CompoundMergeStrategy } from "../task-graph/TaskGraphRunner"; import type { ITransformStep } from "../task-graph/TransformTypes"; import { TaskConfigurationError, TaskJSONError } from "../task/TaskError"; import { getTaskConstructors } from "../task/TaskRegistry"; -import { ConditionalTaskConfig } from "./ConditionalTask"; -import { GraphAsTask, GraphAsTaskConfig } from "./GraphAsTask"; -import { IteratorTaskConfig } from "./IteratorTask"; -import { MapTaskConfig } from "./MapTask"; -import { ReduceTaskConfig } from "./ReduceTask"; -import { TaskConfig, TaskInput } from "./TaskTypes"; -import { WhileTaskConfig } from "./WhileTask"; +import type { ConditionalTaskConfig } from "./ConditionalTask"; +import type { GraphAsTaskConfig } from "./GraphAsTask"; +import { GraphAsTask } from "./GraphAsTask"; +import type { IteratorTaskConfig } from "./IteratorTask"; +import type { MapTaskConfig } from "./MapTask"; +import type { ReduceTaskConfig } from "./ReduceTask"; +import type { TaskConfig, TaskInput } from "./TaskTypes"; +import type { WhileTaskConfig } from "./WhileTask"; // ======================================================================== // JSON Serialization Types diff --git a/packages/task-graph/src/task/TaskQueueRegistry.ts b/packages/task-graph/src/task/TaskQueueRegistry.ts index 737efc753..072cb4c7c 100644 --- a/packages/task-graph/src/task/TaskQueueRegistry.ts +++ b/packages/task-graph/src/task/TaskQueueRegistry.ts @@ -4,8 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { IQueueStorage } from "@workglow/job-queue"; -import { JobQueueClient, JobQueueServer } from "@workglow/job-queue"; +import type { IQueueStorage, JobQueueClient, JobQueueServer } from "@workglow/job-queue"; import { EventEmitter } from "@workglow/util"; /** diff --git a/packages/task-graph/src/task/TaskRegistry.ts b/packages/task-graph/src/task/TaskRegistry.ts index 2941f5b84..60de3f9a1 100644 --- a/packages/task-graph/src/task/TaskRegistry.ts +++ b/packages/task-graph/src/task/TaskRegistry.ts @@ -4,13 +4,13 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { ServiceRegistry } from "@workglow/util"; import { createServiceToken, getLogger, globalServiceRegistry, registerInputCompactor, registerInputResolver, - ServiceRegistry, } from "@workglow/util"; import { validateSchema } from "@workglow/util/schema"; import type { ITaskConstructor } from "./ITask"; diff --git a/packages/task-graph/src/task/TaskRunner.ts b/packages/task-graph/src/task/TaskRunner.ts index 81a3e6512..c1f0de910 100644 --- a/packages/task-graph/src/task/TaskRunner.ts +++ b/packages/task-graph/src/task/TaskRunner.ts @@ -4,12 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { ServiceRegistry } from "@workglow/util"; import { getLogger, getTelemetryProvider, globalServiceRegistry, ResourceScope, - ServiceRegistry, SpanStatusCode, } from "@workglow/util"; import { isCacheRef, resolveReferenceThreshold } from "../cache/CacheRef"; @@ -24,7 +24,7 @@ import { ensureTask } from "../task-graph/Conversions"; import { CacheCoordinator } from "./CacheCoordinator"; import { resolveSchemaInputs, schemaHasFormatAnnotations } from "./InputResolver"; import type { IRunConfig, ITask } from "./ITask"; -import { ITaskRunner } from "./ITaskRunner"; +import type { ITaskRunner } from "./ITaskRunner"; import type { BinaryRefSink, StreamSink } from "./StreamProcessor"; import { StreamProcessor } from "./StreamProcessor"; import type { StreamEvent } from "./StreamTypes"; @@ -47,7 +47,8 @@ import { TaskTimeoutError, } from "./TaskError"; import { TaskRunContext } from "./TaskRunContext"; -import { TaskConfig, TaskInput, TaskOutput, TaskStatus } from "./TaskTypes"; +import type { TaskConfig, TaskInput, TaskOutput } from "./TaskTypes"; +import { TaskStatus } from "./TaskTypes"; /** * Type guard that checks whether a value is an ITask-like object with a mutable `runConfig`. diff --git a/packages/task-graph/src/task/TaskTypes.ts b/packages/task-graph/src/task/TaskTypes.ts index 01a4282bd..ed08e8d17 100644 --- a/packages/task-graph/src/task/TaskTypes.ts +++ b/packages/task-graph/src/task/TaskTypes.ts @@ -4,8 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; -import { StripJSONSchema } from "@workglow/util/schema"; +import type { DataPortSchema, FromSchema, StripJSONSchema } from "@workglow/util/schema"; import type { Task } from "./Task"; /** diff --git a/packages/task-graph/src/task/WhileTask.ts b/packages/task-graph/src/task/WhileTask.ts index 8df9d8607..d85725773 100644 --- a/packages/task-graph/src/task/WhileTask.ts +++ b/packages/task-graph/src/task/WhileTask.ts @@ -9,7 +9,8 @@ import { bridgeSubGraphTaskEvents } from "../task-graph/SubGraphEventBridge"; import { Workflow } from "../task-graph/Workflow"; import { CreateEndLoopWorkflow, CreateLoopWorkflow } from "../task-graph/WorkflowFactories"; import { evaluateCondition, getNestedValue } from "./ConditionUtils"; -import { GraphAsTask, GraphAsTaskConfig, graphAsTaskConfigSchema } from "./GraphAsTask"; +import type { GraphAsTaskConfig } from "./GraphAsTask"; +import { GraphAsTask, graphAsTaskConfigSchema } from "./GraphAsTask"; import type { IExecuteContext, IRunConfig } from "./ITask"; import { resolveIterationBound, type IterationBound } from "./IteratorTask"; import type { StreamEvent, StreamFinish } from "./StreamTypes"; diff --git a/packages/tasks/src/task/ArrayTask.ts b/packages/tasks/src/task/ArrayTask.ts index e51b81dba..5fbb5e731 100644 --- a/packages/tasks/src/task/ArrayTask.ts +++ b/packages/tasks/src/task/ArrayTask.ts @@ -5,22 +5,23 @@ */ import { uuid4 } from "@workglow/util"; -import type { DataPortSchema } from "@workglow/util/schema"; -import { DataPortSchemaNonBoolean, TypedArray, VectorFromSchema } from "@workglow/util/schema"; - -import type { TaskRunContext } from "@workglow/task-graph"; -import { - GraphAsTask, +import type { + DataPortSchema, + DataPortSchemaNonBoolean, + TypedArray, + VectorFromSchema, +} from "@workglow/util/schema"; + +import type { GraphAsTaskConfig, - GraphAsTaskRunner, GraphResultArray, JsonTaskItem, - PROPERTY_ARRAY, - TaskGraph, TaskGraphItemJson, TaskInput, TaskOutput, + TaskRunContext, } from "@workglow/task-graph"; +import { GraphAsTask, GraphAsTaskRunner, PROPERTY_ARRAY, TaskGraph } from "@workglow/task-graph"; export function TypeReplicateArray( type: T, diff --git a/packages/tasks/src/task/DateFormatTask.ts b/packages/tasks/src/task/DateFormatTask.ts index e0307a7a2..51f47ca06 100644 --- a/packages/tasks/src/task/DateFormatTask.ts +++ b/packages/tasks/src/task/DateFormatTask.ts @@ -4,16 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - TaskInvalidInputError, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, TaskInvalidInputError, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function formatDate(input: { value: string; diff --git a/packages/tasks/src/task/DebugLogTask.ts b/packages/tasks/src/task/DebugLogTask.ts index 787f1e29e..9945cee33 100644 --- a/packages/tasks/src/task/DebugLogTask.ts +++ b/packages/tasks/src/task/DebugLogTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { CreateWorkflow, Task, TaskConfig, TaskConfigSchema, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, TaskConfigSchema, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const log_levels = ["dir", "log", "debug", "info", "warn", "error"] as const; type LogLevel = (typeof log_levels)[number]; diff --git a/packages/tasks/src/task/DelayTask.ts b/packages/tasks/src/task/DelayTask.ts index 0799f178f..6120d8a25 100644 --- a/packages/tasks/src/task/DelayTask.ts +++ b/packages/tasks/src/task/DelayTask.ts @@ -4,18 +4,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, - IExecuteContext, Task, TaskAbortedError, - TaskConfig, TaskConfigSchema, Workflow, } from "@workglow/task-graph"; import { sleep } from "@workglow/util"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const delayTaskConfigSchema = { type: "object", diff --git a/packages/tasks/src/task/FetchUrlTask.ts b/packages/tasks/src/task/FetchUrlTask.ts index 83a2a9827..78f3a11d3 100644 --- a/packages/tasks/src/task/FetchUrlTask.ts +++ b/packages/tasks/src/task/FetchUrlTask.ts @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { AbortSignalJobError, IJobExecuteContext, Job } from "@workglow/job-queue"; +import type { IJobExecuteContext } from "@workglow/job-queue"; +import { AbortSignalJobError, Job } from "@workglow/job-queue"; import type { IExecuteContext, RegisteredQueue, @@ -23,7 +24,7 @@ import { TaskConfigurationError, Workflow, } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { safeFetch } from "../util/SafeFetch"; import { classifyUrl, urlResourcePattern } from "../util/UrlClassifier"; import { diff --git a/packages/tasks/src/task/FileLoaderTask.server.ts b/packages/tasks/src/task/FileLoaderTask.server.ts index 582947197..113f49bda 100644 --- a/packages/tasks/src/task/FileLoaderTask.server.ts +++ b/packages/tasks/src/task/FileLoaderTask.server.ts @@ -4,20 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - TaskAbortedError, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, TaskAbortedError, Workflow } from "@workglow/task-graph"; import { readFile } from "node:fs/promises"; -import { - FileLoaderTask as BaseFileLoaderTask, - FileLoaderTaskInput, - FileLoaderTaskOutput, -} from "./FileLoaderTask"; +import type { FileLoaderTaskInput, FileLoaderTaskOutput } from "./FileLoaderTask"; +import { FileLoaderTask as BaseFileLoaderTask } from "./FileLoaderTask"; export type { FileLoaderTaskInput, FileLoaderTaskOutput }; diff --git a/packages/tasks/src/task/FileLoaderTask.ts b/packages/tasks/src/task/FileLoaderTask.ts index f7eba4b28..e0d1623ea 100644 --- a/packages/tasks/src/task/FileLoaderTask.ts +++ b/packages/tasks/src/task/FileLoaderTask.ts @@ -4,16 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - Task, - TaskAbortedError, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; -import { FetchUrlTask, FetchUrlTaskOutput } from "./FetchUrlTask"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, TaskAbortedError, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { FetchUrlTaskOutput } from "./FetchUrlTask"; +import { FetchUrlTask } from "./FetchUrlTask"; let _papaParse: typeof import("papaparse").parse | undefined; diff --git a/packages/tasks/src/task/HumanApprovalTask.ts b/packages/tasks/src/task/HumanApprovalTask.ts index 5f4e0532b..b996a8d74 100644 --- a/packages/tasks/src/task/HumanApprovalTask.ts +++ b/packages/tasks/src/task/HumanApprovalTask.ts @@ -4,12 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy, IExecuteContext } from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Task, TaskAbortedError, - TaskConfig, TaskConfigSchema, Workflow, } from "@workglow/task-graph"; diff --git a/packages/tasks/src/task/HumanInputTask.ts b/packages/tasks/src/task/HumanInputTask.ts index 1d904516e..6068a0832 100644 --- a/packages/tasks/src/task/HumanInputTask.ts +++ b/packages/tasks/src/task/HumanInputTask.ts @@ -4,12 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy, IExecuteContext } from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow, Task, TaskAbortedError, - TaskConfig, TaskConfigSchema, TaskConfigurationError, Workflow, diff --git a/packages/tasks/src/task/InputTask.ts b/packages/tasks/src/task/InputTask.ts index 24782cc70..fde2876f8 100644 --- a/packages/tasks/src/task/InputTask.ts +++ b/packages/tasks/src/task/InputTask.ts @@ -4,8 +4,14 @@ * All Rights Reserved */ -import type { CachePolicy, IExecuteContext, StreamEvent, StreamFinish } from "@workglow/task-graph"; -import { CreateWorkflow, Task, TaskConfig, Workflow } from "@workglow/task-graph"; +import type { + CachePolicy, + IExecuteContext, + StreamEvent, + StreamFinish, + TaskConfig, +} from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; export type InputTaskInput = Record; diff --git a/packages/tasks/src/task/JsonPathTask.ts b/packages/tasks/src/task/JsonPathTask.ts index b37a6a21a..48ed56ea8 100644 --- a/packages/tasks/src/task/JsonPathTask.ts +++ b/packages/tasks/src/task/JsonPathTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/JsonTask.ts b/packages/tasks/src/task/JsonTask.ts index 858a05001..ed939a1d7 100644 --- a/packages/tasks/src/task/JsonTask.ts +++ b/packages/tasks/src/task/JsonTask.ts @@ -4,18 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { TaskGraphJson } from "@workglow/task-graph"; +import type { + GraphAsTaskConfig, + JsonTaskItem, + TaskConfig, + TaskGraphJson, +} from "@workglow/task-graph"; import { createGraphFromDependencyJSON, createGraphFromGraphJSON, CreateWorkflow, GraphAsTask, - GraphAsTaskConfig, - JsonTaskItem, - TaskConfig, Workflow, } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/LambdaTask.ts b/packages/tasks/src/task/LambdaTask.ts index efb8e13fd..6162eca16 100644 --- a/packages/tasks/src/task/LambdaTask.ts +++ b/packages/tasks/src/task/LambdaTask.ts @@ -4,20 +4,22 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { + IExecuteContext, + IExecutePreviewContext, + TaskConfig, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { CreateWorkflow, DATAFLOW_ALL_PORTS, - IExecuteContext, - IExecutePreviewContext, Task, - TaskConfig, TaskConfigSchema, TaskConfigurationError, - TaskInput, - TaskOutput, Workflow, } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; export const lambdaTaskConfigSchema = { type: "object", diff --git a/packages/tasks/src/task/MergeTask.ts b/packages/tasks/src/task/MergeTask.ts index 3da956468..fb23f5ad7 100644 --- a/packages/tasks/src/task/MergeTask.ts +++ b/packages/tasks/src/task/MergeTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/OutputTask.ts b/packages/tasks/src/task/OutputTask.ts index 6c3a2ea0e..cc3fd6860 100644 --- a/packages/tasks/src/task/OutputTask.ts +++ b/packages/tasks/src/task/OutputTask.ts @@ -4,8 +4,14 @@ * All Rights Reserved */ -import type { CachePolicy, IExecuteContext, StreamEvent, StreamFinish } from "@workglow/task-graph"; -import { CreateWorkflow, Task, TaskConfig, Workflow } from "@workglow/task-graph"; +import type { + CachePolicy, + IExecuteContext, + StreamEvent, + StreamFinish, + TaskConfig, +} from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; export type OutputTaskInput = Record; diff --git a/packages/tasks/src/task/RegexTask.ts b/packages/tasks/src/task/RegexTask.ts index 1fcfe160d..2e446d84c 100644 --- a/packages/tasks/src/task/RegexTask.ts +++ b/packages/tasks/src/task/RegexTask.ts @@ -4,17 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - TaskInvalidInputError, - Workflow, -} from "@workglow/task-graph"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, TaskInvalidInputError, Workflow } from "@workglow/task-graph"; import { SECURITY_LIMITS } from "@workglow/util"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; /** * Detects regex patterns prone to catastrophic backtracking (ReDoS). diff --git a/packages/tasks/src/task/SplitTask.ts b/packages/tasks/src/task/SplitTask.ts index 2843e97d5..fabb026f4 100644 --- a/packages/tasks/src/task/SplitTask.ts +++ b/packages/tasks/src/task/SplitTask.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { CachePolicy, IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/TemplateTask.ts b/packages/tasks/src/task/TemplateTask.ts index cbf1834c6..88f3afdae 100644 --- a/packages/tasks/src/task/TemplateTask.ts +++ b/packages/tasks/src/task/TemplateTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function renderTemplate(template: string, values: Record): string { return template.replace(/\{\{([^{}]+)\}\}/g, (_match, expr: string) => { diff --git a/packages/tasks/src/task/adaptive.ts b/packages/tasks/src/task/adaptive.ts index b99fdaa09..13034572e 100644 --- a/packages/tasks/src/task/adaptive.ts +++ b/packages/tasks/src/task/adaptive.ts @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateAdaptiveWorkflow, TaskConfig, Workflow } from "@workglow/task-graph"; +import type { TaskConfig } from "@workglow/task-graph"; +import { CreateAdaptiveWorkflow, Workflow } from "@workglow/task-graph"; import { ScalarAddTask } from "./scalar/ScalarAddTask"; import { ScalarDivideTask } from "./scalar/ScalarDivideTask"; import { ScalarMultiplyTask } from "./scalar/ScalarMultiplyTask"; diff --git a/packages/tasks/src/task/image/ImageSchemas.ts b/packages/tasks/src/task/image/ImageSchemas.ts index 327045d49..0dc276f8f 100644 --- a/packages/tasks/src/task/image/ImageSchemas.ts +++ b/packages/tasks/src/task/image/ImageSchemas.ts @@ -5,8 +5,8 @@ */ import type { ColorObject } from "@workglow/util/media"; -import type { JsonSchema } from "@workglow/util/schema"; -import { FromSchema, FromSchemaDefaultOptions, FromSchemaOptions } from "@workglow/util/schema"; +import type { FromSchema, FromSchemaOptions, JsonSchema } from "@workglow/util/schema"; +import { FromSchemaDefaultOptions } from "@workglow/util/schema"; const cssRgbChannelPattern = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)"; const cssRgbAlphaPattern = "(?:0(?:\\.\\d+)?|1(?:\\.0+)?)"; diff --git a/packages/tasks/src/task/image/blur/ImageBlurTask.ts b/packages/tasks/src/task/image/blur/ImageBlurTask.ts index 21d4a5a7c..7ffae3434 100644 --- a/packages/tasks/src/task/image/blur/ImageBlurTask.ts +++ b/packages/tasks/src/task/image/blur/ImageBlurTask.ts @@ -5,7 +5,7 @@ */ import { CreateWorkflow, Workflow, type TaskConfig } from "@workglow/task-graph"; import { ImageValueSchema } from "@workglow/util/media"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { ImageFilterTask, type ImageFilterInput, type ImageFilterOutput } from "../ImageFilterTask"; import type { BlurParams } from "./blur.cpu"; diff --git a/packages/tasks/src/task/image/blur/blur.sharp.ts b/packages/tasks/src/task/image/blur/blur.sharp.ts index 813799c0c..a5773a905 100644 --- a/packages/tasks/src/task/image/blur/blur.sharp.ts +++ b/packages/tasks/src/task/image/blur/blur.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; import type { BlurParams } from "./blur.cpu"; registerFilterOp("sharp", "blur", (image, { radius }) => { diff --git a/packages/tasks/src/task/image/blur/blur.webgpu.ts b/packages/tasks/src/task/image/blur/blur.webgpu.ts index 398bb8ca0..988afa6d5 100644 --- a/packages/tasks/src/task/image/blur/blur.webgpu.ts +++ b/packages/tasks/src/task/image/blur/blur.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; import type { BlurParams } from "./blur.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/border/border.sharp.ts b/packages/tasks/src/task/image/border/border.sharp.ts index 6e31ef47f..42442f003 100644 --- a/packages/tasks/src/task/image/border/border.sharp.ts +++ b/packages/tasks/src/task/image/border/border.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { SharpImage, registerFilterOp, resolveColor } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp, resolveColor } from "@workglow/util/media"; import type { BorderParams } from "./border.cpu"; registerFilterOp("sharp", "border", (image, { borderWidth: bw, color }) => { diff --git a/packages/tasks/src/task/image/border/border.webgpu.ts b/packages/tasks/src/task/image/border/border.webgpu.ts index 19b123d74..1b72c5c24 100644 --- a/packages/tasks/src/task/image/border/border.webgpu.ts +++ b/packages/tasks/src/task/image/border/border.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { VERTEX_PRELUDE, WebGpuImage, registerFilterOp, resolveColor } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { VERTEX_PRELUDE, registerFilterOp, resolveColor } from "@workglow/util/media"; import type { BorderParams } from "./border.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/brightness/brightness.sharp.ts b/packages/tasks/src/task/image/brightness/brightness.sharp.ts index 84a1049ac..cb9418dc9 100644 --- a/packages/tasks/src/task/image/brightness/brightness.sharp.ts +++ b/packages/tasks/src/task/image/brightness/brightness.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; import type { BrightnessParams } from "./brightness.cpu"; registerFilterOp("sharp", "brightness", (image, { amount }) => { diff --git a/packages/tasks/src/task/image/brightness/brightness.webgpu.ts b/packages/tasks/src/task/image/brightness/brightness.webgpu.ts index 5da536135..dfbcf1f57 100644 --- a/packages/tasks/src/task/image/brightness/brightness.webgpu.ts +++ b/packages/tasks/src/task/image/brightness/brightness.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; import type { BrightnessParams } from "./brightness.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/contrast/contrast.sharp.ts b/packages/tasks/src/task/image/contrast/contrast.sharp.ts index 759813629..cb4cc99ef 100644 --- a/packages/tasks/src/task/image/contrast/contrast.sharp.ts +++ b/packages/tasks/src/task/image/contrast/contrast.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; import type { ContrastParams } from "./contrast.cpu"; registerFilterOp("sharp", "contrast", (image, { amount }) => { diff --git a/packages/tasks/src/task/image/contrast/contrast.webgpu.ts b/packages/tasks/src/task/image/contrast/contrast.webgpu.ts index 3c9704896..054fd8913 100644 --- a/packages/tasks/src/task/image/contrast/contrast.webgpu.ts +++ b/packages/tasks/src/task/image/contrast/contrast.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; import type { ContrastParams } from "./contrast.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/crop/crop.sharp.ts b/packages/tasks/src/task/image/crop/crop.sharp.ts index 71929219e..1c97e618a 100644 --- a/packages/tasks/src/task/image/crop/crop.sharp.ts +++ b/packages/tasks/src/task/image/crop/crop.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; import type { CropParams } from "./crop.cpu"; registerFilterOp("sharp", "crop", (image, { left, top, width, height }) => { diff --git a/packages/tasks/src/task/image/crop/crop.webgpu.ts b/packages/tasks/src/task/image/crop/crop.webgpu.ts index 3797999a3..0d1841401 100644 --- a/packages/tasks/src/task/image/crop/crop.webgpu.ts +++ b/packages/tasks/src/task/image/crop/crop.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; import type { CropParams } from "./crop.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/flip/flip.sharp.ts b/packages/tasks/src/task/image/flip/flip.sharp.ts index c6d5212e9..e52c810cc 100644 --- a/packages/tasks/src/task/image/flip/flip.sharp.ts +++ b/packages/tasks/src/task/image/flip/flip.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; import type { FlipParams } from "./flip.cpu"; registerFilterOp("sharp", "flip", (image, { direction }) => { diff --git a/packages/tasks/src/task/image/flip/flip.webgpu.ts b/packages/tasks/src/task/image/flip/flip.webgpu.ts index 66220abb3..fddbc0b7c 100644 --- a/packages/tasks/src/task/image/flip/flip.webgpu.ts +++ b/packages/tasks/src/task/image/flip/flip.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; import type { FlipParams } from "./flip.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/grayscale/grayscale.sharp.ts b/packages/tasks/src/task/image/grayscale/grayscale.sharp.ts index eecd80318..a1fc9a960 100644 --- a/packages/tasks/src/task/image/grayscale/grayscale.sharp.ts +++ b/packages/tasks/src/task/image/grayscale/grayscale.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; registerFilterOp("sharp", "grayscale", (image, _params) => { return (image as SharpImage).apply((p) => p.grayscale()); diff --git a/packages/tasks/src/task/image/grayscale/grayscale.webgpu.ts b/packages/tasks/src/task/image/grayscale/grayscale.webgpu.ts index 227e35652..251945e81 100644 --- a/packages/tasks/src/task/image/grayscale/grayscale.webgpu.ts +++ b/packages/tasks/src/task/image/grayscale/grayscale.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; const SHADER_SRC = `${VERTEX_PRELUDE} @fragment diff --git a/packages/tasks/src/task/image/invert/invert.sharp.ts b/packages/tasks/src/task/image/invert/invert.sharp.ts index f3b053fc1..88cff8ba2 100644 --- a/packages/tasks/src/task/image/invert/invert.sharp.ts +++ b/packages/tasks/src/task/image/invert/invert.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; registerFilterOp("sharp", "invert", (image, _params) => { return (image as SharpImage).apply((p) => p.negate({ alpha: false })); diff --git a/packages/tasks/src/task/image/invert/invert.webgpu.ts b/packages/tasks/src/task/image/invert/invert.webgpu.ts index 985f5ff0c..558d44ec6 100644 --- a/packages/tasks/src/task/image/invert/invert.webgpu.ts +++ b/packages/tasks/src/task/image/invert/invert.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; const SHADER_SRC = `${VERTEX_PRELUDE} @fragment diff --git a/packages/tasks/src/task/image/pixelate/pixelate.sharp.ts b/packages/tasks/src/task/image/pixelate/pixelate.sharp.ts index 7cf29f1cc..67a6d2ce0 100644 --- a/packages/tasks/src/task/image/pixelate/pixelate.sharp.ts +++ b/packages/tasks/src/task/image/pixelate/pixelate.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; import type { PixelateParams } from "./pixelate.cpu"; registerFilterOp("sharp", "pixelate", (image, { blockSize }) => { diff --git a/packages/tasks/src/task/image/pixelate/pixelate.webgpu.ts b/packages/tasks/src/task/image/pixelate/pixelate.webgpu.ts index ed69c4ecf..e26d2df5d 100644 --- a/packages/tasks/src/task/image/pixelate/pixelate.webgpu.ts +++ b/packages/tasks/src/task/image/pixelate/pixelate.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; import type { PixelateParams } from "./pixelate.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/posterize/posterize.webgpu.ts b/packages/tasks/src/task/image/posterize/posterize.webgpu.ts index 6c34af6ec..79fe35dc9 100644 --- a/packages/tasks/src/task/image/posterize/posterize.webgpu.ts +++ b/packages/tasks/src/task/image/posterize/posterize.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; import type { PosterizeParams } from "./posterize.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/resize/resize.sharp.ts b/packages/tasks/src/task/image/resize/resize.sharp.ts index 399aa55e7..91d20917d 100644 --- a/packages/tasks/src/task/image/resize/resize.sharp.ts +++ b/packages/tasks/src/task/image/resize/resize.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; import type { ResizeParams } from "./resize.cpu"; registerFilterOp("sharp", "resize", (image, { width, height, fit, kernel }) => { diff --git a/packages/tasks/src/task/image/resize/resize.webgpu.ts b/packages/tasks/src/task/image/resize/resize.webgpu.ts index b226362d3..e9e437988 100644 --- a/packages/tasks/src/task/image/resize/resize.webgpu.ts +++ b/packages/tasks/src/task/image/resize/resize.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; import type { ResizeParams } from "./resize.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/rotate/rotate.sharp.ts b/packages/tasks/src/task/image/rotate/rotate.sharp.ts index 94590a56d..ec8df62f4 100644 --- a/packages/tasks/src/task/image/rotate/rotate.sharp.ts +++ b/packages/tasks/src/task/image/rotate/rotate.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; import type { RotateParams } from "./rotate.cpu"; registerFilterOp("sharp", "rotate", (image, { angle, background }) => { diff --git a/packages/tasks/src/task/image/rotate/rotate.webgpu.ts b/packages/tasks/src/task/image/rotate/rotate.webgpu.ts index cb3ac4834..fc344578a 100644 --- a/packages/tasks/src/task/image/rotate/rotate.webgpu.ts +++ b/packages/tasks/src/task/image/rotate/rotate.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; import type { RotateParams } from "./rotate.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/sepia/sepia.sharp.ts b/packages/tasks/src/task/image/sepia/sepia.sharp.ts index 0f567850d..c9477e275 100644 --- a/packages/tasks/src/task/image/sepia/sepia.sharp.ts +++ b/packages/tasks/src/task/image/sepia/sepia.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; registerFilterOp("sharp", "sepia", (image, _params) => { return (image as SharpImage).apply((p) => diff --git a/packages/tasks/src/task/image/sepia/sepia.webgpu.ts b/packages/tasks/src/task/image/sepia/sepia.webgpu.ts index fbcad0bdb..83af5b3fb 100644 --- a/packages/tasks/src/task/image/sepia/sepia.webgpu.ts +++ b/packages/tasks/src/task/image/sepia/sepia.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; const SHADER_SRC = `${VERTEX_PRELUDE} @fragment diff --git a/packages/tasks/src/task/image/text/ImageTextTask.ts b/packages/tasks/src/task/image/text/ImageTextTask.ts index 407799470..dbcd4ac13 100644 --- a/packages/tasks/src/task/image/text/ImageTextTask.ts +++ b/packages/tasks/src/task/image/text/ImageTextTask.ts @@ -19,8 +19,7 @@ import { resolveColor, type RgbaPixelBuffer, } from "@workglow/util/media"; -import type { DataPortSchema } from "@workglow/util/schema"; -import { FromSchema } from "@workglow/util/schema"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { ColorValueSchema } from "../ImageSchemas"; import { IMAGE_TEXT_ANCHOR_POSITIONS, diff --git a/packages/tasks/src/task/image/threshold/threshold.sharp.ts b/packages/tasks/src/task/image/threshold/threshold.sharp.ts index b8f1bda8f..161f7e4a9 100644 --- a/packages/tasks/src/task/image/threshold/threshold.sharp.ts +++ b/packages/tasks/src/task/image/threshold/threshold.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, SharpImage } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp } from "@workglow/util/media"; import type { ThresholdParams } from "./threshold.cpu"; registerFilterOp("sharp", "threshold", (image, { value }) => { diff --git a/packages/tasks/src/task/image/threshold/threshold.webgpu.ts b/packages/tasks/src/task/image/threshold/threshold.webgpu.ts index 7cf7e76f9..2f1c011d4 100644 --- a/packages/tasks/src/task/image/threshold/threshold.webgpu.ts +++ b/packages/tasks/src/task/image/threshold/threshold.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; import type { ThresholdParams } from "./threshold.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/tint/tint.sharp.ts b/packages/tasks/src/task/image/tint/tint.sharp.ts index 4ea109226..1051cc73d 100644 --- a/packages/tasks/src/task/image/tint/tint.sharp.ts +++ b/packages/tasks/src/task/image/tint/tint.sharp.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { SharpImage, registerFilterOp, resolveColor } from "@workglow/util/media"; +import type { SharpImage } from "@workglow/util/media"; +import { registerFilterOp, resolveColor } from "@workglow/util/media"; import type { TintParams } from "./tint.cpu"; // Sharp's built-in `.tint(rgb)` recomposes the channels via a fixed matrix and diff --git a/packages/tasks/src/task/image/tint/tint.webgpu.ts b/packages/tasks/src/task/image/tint/tint.webgpu.ts index 0f2234aba..30a30933a 100644 --- a/packages/tasks/src/task/image/tint/tint.webgpu.ts +++ b/packages/tasks/src/task/image/tint/tint.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { VERTEX_PRELUDE, WebGpuImage, registerFilterOp, resolveColor } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { VERTEX_PRELUDE, registerFilterOp, resolveColor } from "@workglow/util/media"; import type { TintParams } from "./tint.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/image/transparency/transparency.webgpu.ts b/packages/tasks/src/task/image/transparency/transparency.webgpu.ts index 1d9f6896a..c84c0984f 100644 --- a/packages/tasks/src/task/image/transparency/transparency.webgpu.ts +++ b/packages/tasks/src/task/image/transparency/transparency.webgpu.ts @@ -3,7 +3,8 @@ * Copyright 2026 Steven Roussey * All Rights Reserved */ -import { registerFilterOp, VERTEX_PRELUDE, WebGpuImage } from "@workglow/util/media"; +import type { WebGpuImage } from "@workglow/util/media"; +import { registerFilterOp, VERTEX_PRELUDE } from "@workglow/util/media"; import type { TransparencyParams } from "./transparency.cpu"; const SHADER_SRC = `${VERTEX_PRELUDE} diff --git a/packages/tasks/src/task/scalar/ScalarAbsTask.ts b/packages/tasks/src/task/scalar/ScalarAbsTask.ts index d27c64197..21e421dc2 100644 --- a/packages/tasks/src/task/scalar/ScalarAbsTask.ts +++ b/packages/tasks/src/task/scalar/ScalarAbsTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/scalar/ScalarAddTask.ts b/packages/tasks/src/task/scalar/ScalarAddTask.ts index df9c43f9f..e6deae622 100644 --- a/packages/tasks/src/task/scalar/ScalarAddTask.ts +++ b/packages/tasks/src/task/scalar/ScalarAddTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { sumPrecise } from "./sumPrecise"; const inputSchema = { diff --git a/packages/tasks/src/task/scalar/ScalarCeilTask.ts b/packages/tasks/src/task/scalar/ScalarCeilTask.ts index 4fa3181f1..41ab1bb8b 100644 --- a/packages/tasks/src/task/scalar/ScalarCeilTask.ts +++ b/packages/tasks/src/task/scalar/ScalarCeilTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/scalar/ScalarDivideTask.ts b/packages/tasks/src/task/scalar/ScalarDivideTask.ts index eefee5762..215478c8d 100644 --- a/packages/tasks/src/task/scalar/ScalarDivideTask.ts +++ b/packages/tasks/src/task/scalar/ScalarDivideTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - Task, - TaskConfig, - TaskInvalidInputError, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, TaskInvalidInputError, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/scalar/ScalarFloorTask.ts b/packages/tasks/src/task/scalar/ScalarFloorTask.ts index 7f7a42990..58929486f 100644 --- a/packages/tasks/src/task/scalar/ScalarFloorTask.ts +++ b/packages/tasks/src/task/scalar/ScalarFloorTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/scalar/ScalarMaxTask.ts b/packages/tasks/src/task/scalar/ScalarMaxTask.ts index 6db75c7af..466b7c79d 100644 --- a/packages/tasks/src/task/scalar/ScalarMaxTask.ts +++ b/packages/tasks/src/task/scalar/ScalarMaxTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/scalar/ScalarMinTask.ts b/packages/tasks/src/task/scalar/ScalarMinTask.ts index aac6a8ab3..a2ea345eb 100644 --- a/packages/tasks/src/task/scalar/ScalarMinTask.ts +++ b/packages/tasks/src/task/scalar/ScalarMinTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/scalar/ScalarMultiplyTask.ts b/packages/tasks/src/task/scalar/ScalarMultiplyTask.ts index 1a9fd91a2..d37060917 100644 --- a/packages/tasks/src/task/scalar/ScalarMultiplyTask.ts +++ b/packages/tasks/src/task/scalar/ScalarMultiplyTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/scalar/ScalarRoundTask.ts b/packages/tasks/src/task/scalar/ScalarRoundTask.ts index 03af863cf..ecb7ff8f0 100644 --- a/packages/tasks/src/task/scalar/ScalarRoundTask.ts +++ b/packages/tasks/src/task/scalar/ScalarRoundTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/scalar/ScalarSubtractTask.ts b/packages/tasks/src/task/scalar/ScalarSubtractTask.ts index 0b49e2a48..5c145592e 100644 --- a/packages/tasks/src/task/scalar/ScalarSubtractTask.ts +++ b/packages/tasks/src/task/scalar/ScalarSubtractTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/scalar/ScalarSumTask.ts b/packages/tasks/src/task/scalar/ScalarSumTask.ts index ea076d59c..b939c495c 100644 --- a/packages/tasks/src/task/scalar/ScalarSumTask.ts +++ b/packages/tasks/src/task/scalar/ScalarSumTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; import { sumPrecise } from "./sumPrecise"; const inputSchema = { diff --git a/packages/tasks/src/task/scalar/ScalarTruncTask.ts b/packages/tasks/src/task/scalar/ScalarTruncTask.ts index 314be243f..03f8f23c2 100644 --- a/packages/tasks/src/task/scalar/ScalarTruncTask.ts +++ b/packages/tasks/src/task/scalar/ScalarTruncTask.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/string/StringConcatTask.ts b/packages/tasks/src/task/string/StringConcatTask.ts index 569a7c426..d9edbfd4d 100644 --- a/packages/tasks/src/task/string/StringConcatTask.ts +++ b/packages/tasks/src/task/string/StringConcatTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function concatStrings(input: Record): string { return Object.values(input).join(""); diff --git a/packages/tasks/src/task/string/StringIncludesTask.ts b/packages/tasks/src/task/string/StringIncludesTask.ts index 3ddbd3976..bec71d2bb 100644 --- a/packages/tasks/src/task/string/StringIncludesTask.ts +++ b/packages/tasks/src/task/string/StringIncludesTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function stringIncludes(text: string, search: string): boolean { return text.includes(search); diff --git a/packages/tasks/src/task/string/StringJoinTask.ts b/packages/tasks/src/task/string/StringJoinTask.ts index 6a8f3c14a..8ca8369ad 100644 --- a/packages/tasks/src/task/string/StringJoinTask.ts +++ b/packages/tasks/src/task/string/StringJoinTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function joinStrings(texts: readonly string[], separator: string | undefined): string { return texts.join(separator ?? ""); diff --git a/packages/tasks/src/task/string/StringLengthTask.ts b/packages/tasks/src/task/string/StringLengthTask.ts index 12a7c85b7..60079a466 100644 --- a/packages/tasks/src/task/string/StringLengthTask.ts +++ b/packages/tasks/src/task/string/StringLengthTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function stringLength(text: string): number { return text.length; diff --git a/packages/tasks/src/task/string/StringLowerCaseTask.ts b/packages/tasks/src/task/string/StringLowerCaseTask.ts index 349d9da45..4af6f0bbd 100644 --- a/packages/tasks/src/task/string/StringLowerCaseTask.ts +++ b/packages/tasks/src/task/string/StringLowerCaseTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function toLowerCase(text: string): string { return text.toLowerCase(); diff --git a/packages/tasks/src/task/string/StringReplaceTask.ts b/packages/tasks/src/task/string/StringReplaceTask.ts index b967aef70..5c72b4646 100644 --- a/packages/tasks/src/task/string/StringReplaceTask.ts +++ b/packages/tasks/src/task/string/StringReplaceTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function replaceString(text: string, search: string, replace: string): string { return text.replaceAll(search, replace); diff --git a/packages/tasks/src/task/string/StringSliceTask.ts b/packages/tasks/src/task/string/StringSliceTask.ts index 6a6cb2b9c..62faa8e0f 100644 --- a/packages/tasks/src/task/string/StringSliceTask.ts +++ b/packages/tasks/src/task/string/StringSliceTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function sliceString(text: string, start: number, end: number | undefined): string { return text.slice(start, end); diff --git a/packages/tasks/src/task/string/StringTemplateTask.ts b/packages/tasks/src/task/string/StringTemplateTask.ts index 8bd35a65b..919ce93d4 100644 --- a/packages/tasks/src/task/string/StringTemplateTask.ts +++ b/packages/tasks/src/task/string/StringTemplateTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function renderStringTemplate(template: string, values: Record): string { let text = template; diff --git a/packages/tasks/src/task/string/StringTrimTask.ts b/packages/tasks/src/task/string/StringTrimTask.ts index 197cd4d85..a0b1b1182 100644 --- a/packages/tasks/src/task/string/StringTrimTask.ts +++ b/packages/tasks/src/task/string/StringTrimTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function trimString(text: string): string { return text.trim(); diff --git a/packages/tasks/src/task/string/StringUpperCaseTask.ts b/packages/tasks/src/task/string/StringUpperCaseTask.ts index b8b2b7b4a..29c72ac59 100644 --- a/packages/tasks/src/task/string/StringUpperCaseTask.ts +++ b/packages/tasks/src/task/string/StringUpperCaseTask.ts @@ -4,15 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - IExecutePreviewContext, - Task, - TaskConfig, - Workflow, -} from "@workglow/task-graph"; -import { DataPortSchema, FromSchema } from "@workglow/util/schema"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema } from "@workglow/util/schema"; function toUpperCase(text: string): string { return text.toUpperCase(); diff --git a/packages/tasks/src/task/vector/VectorDistanceTask.ts b/packages/tasks/src/task/vector/VectorDistanceTask.ts index 688e052ba..e8ca356a7 100644 --- a/packages/tasks/src/task/vector/VectorDistanceTask.ts +++ b/packages/tasks/src/task/vector/VectorDistanceTask.ts @@ -4,21 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - Task, - TaskConfig, - TaskInvalidInputError, - Workflow, -} from "@workglow/task-graph"; -import { +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, TaskInvalidInputError, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema, TypedArray, - TypedArraySchema, TypedArraySchemaOptions, } from "@workglow/util/schema"; +import { TypedArraySchema } from "@workglow/util/schema"; import { sumPrecise } from "../scalar/sumPrecise"; const inputSchema = { diff --git a/packages/tasks/src/task/vector/VectorDivideTask.ts b/packages/tasks/src/task/vector/VectorDivideTask.ts index 503ea05ea..c7d7281f9 100644 --- a/packages/tasks/src/task/vector/VectorDivideTask.ts +++ b/packages/tasks/src/task/vector/VectorDivideTask.ts @@ -4,22 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - Task, - TaskConfig, - TaskInvalidInputError, - Workflow, -} from "@workglow/task-graph"; -import { - createTypedArrayFrom, +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, TaskInvalidInputError, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema, TypedArray, - TypedArraySchema, TypedArraySchemaOptions, } from "@workglow/util/schema"; +import { createTypedArrayFrom, TypedArraySchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/vector/VectorDotProductTask.ts b/packages/tasks/src/task/vector/VectorDotProductTask.ts index affecade0..8c50c16bc 100644 --- a/packages/tasks/src/task/vector/VectorDotProductTask.ts +++ b/packages/tasks/src/task/vector/VectorDotProductTask.ts @@ -4,21 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - Task, - TaskConfig, - TaskInvalidInputError, - Workflow, -} from "@workglow/task-graph"; -import { +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, TaskInvalidInputError, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema, TypedArray, - TypedArraySchema, TypedArraySchemaOptions, } from "@workglow/util/schema"; +import { TypedArraySchema } from "@workglow/util/schema"; import { sumPrecise } from "../scalar/sumPrecise"; const inputSchema = { diff --git a/packages/tasks/src/task/vector/VectorMultiplyTask.ts b/packages/tasks/src/task/vector/VectorMultiplyTask.ts index a6eccfa74..19a0b23f3 100644 --- a/packages/tasks/src/task/vector/VectorMultiplyTask.ts +++ b/packages/tasks/src/task/vector/VectorMultiplyTask.ts @@ -4,22 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - Task, - TaskConfig, - TaskInvalidInputError, - Workflow, -} from "@workglow/task-graph"; -import { - createTypedArrayFrom, +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, TaskInvalidInputError, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema, TypedArray, - TypedArraySchema, TypedArraySchemaOptions, } from "@workglow/util/schema"; +import { createTypedArrayFrom, TypedArraySchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/vector/VectorNormalizeTask.ts b/packages/tasks/src/task/vector/VectorNormalizeTask.ts index 6d28fe813..464968da0 100644 --- a/packages/tasks/src/task/vector/VectorNormalizeTask.ts +++ b/packages/tasks/src/task/vector/VectorNormalizeTask.ts @@ -4,14 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { - DataPortSchema, - FromSchema, - TypedArraySchema, - TypedArraySchemaOptions, - normalize, -} from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import { TypedArraySchema, normalize } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/vector/VectorScaleTask.ts b/packages/tasks/src/task/vector/VectorScaleTask.ts index 5da627da4..786c5dcad 100644 --- a/packages/tasks/src/task/vector/VectorScaleTask.ts +++ b/packages/tasks/src/task/vector/VectorScaleTask.ts @@ -4,14 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CreateWorkflow, IExecuteContext, Task, TaskConfig, Workflow } from "@workglow/task-graph"; -import { - createTypedArrayFrom, - DataPortSchema, - FromSchema, - TypedArraySchema, - TypedArraySchemaOptions, -} from "@workglow/util/schema"; +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema"; +import { createTypedArrayFrom, TypedArraySchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/vector/VectorSubtractTask.ts b/packages/tasks/src/task/vector/VectorSubtractTask.ts index 5ecee71b6..64b92d41c 100644 --- a/packages/tasks/src/task/vector/VectorSubtractTask.ts +++ b/packages/tasks/src/task/vector/VectorSubtractTask.ts @@ -4,22 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - Task, - TaskConfig, - TaskInvalidInputError, - Workflow, -} from "@workglow/task-graph"; -import { - createTypedArrayFrom, +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, TaskInvalidInputError, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema, TypedArray, - TypedArraySchema, TypedArraySchemaOptions, } from "@workglow/util/schema"; +import { createTypedArrayFrom, TypedArraySchema } from "@workglow/util/schema"; const inputSchema = { type: "object", diff --git a/packages/tasks/src/task/vector/VectorSumTask.ts b/packages/tasks/src/task/vector/VectorSumTask.ts index ecb8a263d..c56d6f2ce 100644 --- a/packages/tasks/src/task/vector/VectorSumTask.ts +++ b/packages/tasks/src/task/vector/VectorSumTask.ts @@ -4,22 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - CreateWorkflow, - IExecuteContext, - Task, - TaskConfig, - TaskInvalidInputError, - Workflow, -} from "@workglow/task-graph"; -import { - createTypedArrayFrom, +import type { IExecuteContext, TaskConfig } from "@workglow/task-graph"; +import { CreateWorkflow, Task, TaskInvalidInputError, Workflow } from "@workglow/task-graph"; +import type { DataPortSchema, FromSchema, TypedArray, - TypedArraySchema, TypedArraySchemaOptions, } from "@workglow/util/schema"; +import { createTypedArrayFrom, TypedArraySchema } from "@workglow/util/schema"; import { sumPrecise } from "../scalar/sumPrecise"; const inputSchema = { diff --git a/packages/test/src/binding/PostgresModelRepository.ts b/packages/test/src/binding/PostgresModelRepository.ts index ecda15282..12f2149ad 100644 --- a/packages/test/src/binding/PostgresModelRepository.ts +++ b/packages/test/src/binding/PostgresModelRepository.ts @@ -6,7 +6,7 @@ import { ModelPrimaryKeyNames, ModelRecordSchema, ModelRepository } from "@workglow/ai"; import { PostgresTabularStorage } from "@workglow/postgres/storage"; -import { Pool } from "pg"; +import type { Pool } from "pg"; /** * PostgreSQL implementation of a model repository. diff --git a/packages/test/src/binding/StreamingSqliteTaskOutputRepository.ts b/packages/test/src/binding/StreamingSqliteTaskOutputRepository.ts index f4e8f8869..6d05aa067 100644 --- a/packages/test/src/binding/StreamingSqliteTaskOutputRepository.ts +++ b/packages/test/src/binding/StreamingSqliteTaskOutputRepository.ts @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Sqlite, SqliteTabularStorage } from "@workglow/sqlite/storage"; +import type { Sqlite } from "@workglow/sqlite/storage"; +import { SqliteTabularStorage } from "@workglow/sqlite/storage"; import { tabularTaskOutputStorage, TaskOutputPrimaryKeyNames, diff --git a/packages/test/src/contract/tabular-storage/assertions/subscribeToChanges.ts b/packages/test/src/contract/tabular-storage/assertions/subscribeToChanges.ts index c7da3cdc3..02edee031 100644 --- a/packages/test/src/contract/tabular-storage/assertions/subscribeToChanges.ts +++ b/packages/test/src/contract/tabular-storage/assertions/subscribeToChanges.ts @@ -8,7 +8,7 @@ import type { ITabularStorage, TabularChangePayload } from "@workglow/storage"; import { sleep } from "@workglow/util"; import type { FromSchema } from "@workglow/util/schema"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; -import { +import type { CompoundPrimaryKeyNames, CompoundSchema, } from "../../../test/storage-tabular/genericTabularStorageTests"; diff --git a/packages/test/src/test/ai-model/PostgresModelRepository.integration.test.ts b/packages/test/src/test/ai-model/PostgresModelRepository.integration.test.ts index df3d06835..ec696fef6 100644 --- a/packages/test/src/test/ai-model/PostgresModelRepository.integration.test.ts +++ b/packages/test/src/test/ai-model/PostgresModelRepository.integration.test.ts @@ -6,7 +6,7 @@ import { PGlite } from "@electric-sql/pglite"; import { setLogger, uuid4 } from "@workglow/util"; -import { Pool } from "pg"; +import type { Pool } from "pg"; import { afterAll, describe } from "vitest"; import { PostgresModelRepository } from "../../binding/PostgresModelRepository"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/ai-model/genericModelRepositoryTests.ts b/packages/test/src/test/ai-model/genericModelRepositoryTests.ts index e8eec6edf..eed004359 100644 --- a/packages/test/src/test/ai-model/genericModelRepositoryTests.ts +++ b/packages/test/src/test/ai-model/genericModelRepositoryTests.ts @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { getGlobalModelRepository, ModelRepository, setGlobalModelRepository } from "@workglow/ai"; +import type { ModelRepository } from "@workglow/ai"; +import { getGlobalModelRepository, setGlobalModelRepository } from "@workglow/ai"; import { beforeEach, expect, it } from "vitest"; const HF_TRANSFORMERS_ONNX = "HF_TRANSFORMERS_ONNX"; diff --git a/packages/test/src/test/ai-provider-hft/TextEmbeddingTask.integration.test.ts b/packages/test/src/test/ai-provider-hft/TextEmbeddingTask.integration.test.ts index 87685bc95..2e879cff6 100644 --- a/packages/test/src/test/ai-provider-hft/TextEmbeddingTask.integration.test.ts +++ b/packages/test/src/test/ai-provider-hft/TextEmbeddingTask.integration.test.ts @@ -4,12 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { TextEmbeddingTaskOutput } from "@workglow/ai"; import { getGlobalModelRepository, InMemoryModelRepository, ModelDownloadTask, setGlobalModelRepository, - TextEmbeddingTaskOutput, } from "@workglow/ai"; import type { HfTransformersOnnxModelRecord } from "@workglow/huggingface-transformers/ai-runtime"; import { diff --git a/packages/test/src/test/ai-provider/AiProviderRegistry.test.ts b/packages/test/src/test/ai-provider/AiProviderRegistry.test.ts index d84bb43f0..18ed0ec10 100644 --- a/packages/test/src/test/ai-provider/AiProviderRegistry.test.ts +++ b/packages/test/src/test/ai-provider/AiProviderRegistry.test.ts @@ -4,11 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { AiProviderRunFn, AiProviderRunFnRegistration, Capability } from "@workglow/ai"; +import type { + AiJobInput, + AiProviderRunFn, + AiProviderRunFnRegistration, + Capability, +} from "@workglow/ai"; import { accumulatingEmit, AiJob, - AiJobInput, AiProviderRegistry, getAiProviderRegistry, setAiProviderRegistry, @@ -22,11 +26,10 @@ import { RateLimiter, wrapQueueStorage, } from "@workglow/job-queue"; +import type { TaskInput, TaskOutput } from "@workglow/task-graph"; import { getTaskQueueRegistry, setTaskQueueRegistry, - TaskInput, - TaskOutput, TaskQueueRegistry, } from "@workglow/task-graph"; import { setLogger } from "@workglow/util"; diff --git a/packages/test/src/test/ai-provider/DownloadModelAbort.integration.test.ts b/packages/test/src/test/ai-provider/DownloadModelAbort.integration.test.ts index 4024fedb9..ba11132e9 100644 --- a/packages/test/src/test/ai-provider/DownloadModelAbort.integration.test.ts +++ b/packages/test/src/test/ai-provider/DownloadModelAbort.integration.test.ts @@ -4,11 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { ModelDownloadTaskRunOutput } from "@workglow/ai"; import { getGlobalModelRepository, InMemoryModelRepository, ModelDownloadTask, - ModelDownloadTaskRunOutput, setGlobalModelRepository, unloadModel, } from "@workglow/ai"; diff --git a/packages/test/src/test/ai-provider/StreamingProvider.test.ts b/packages/test/src/test/ai-provider/StreamingProvider.test.ts index 06a269fb8..b6ecd6a34 100644 --- a/packages/test/src/test/ai-provider/StreamingProvider.test.ts +++ b/packages/test/src/test/ai-provider/StreamingProvider.test.ts @@ -4,10 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { AiProviderRunFn, Capability } from "@workglow/ai"; +import type { AiJobInput, AiProviderRunFn, Capability } from "@workglow/ai"; import { AiJob, - AiJobInput, AiProviderRegistry, getAiProviderRegistry, setAiProviderRegistry, @@ -21,12 +20,10 @@ import { RateLimiter, wrapQueueStorage, } from "@workglow/job-queue"; -import type { StreamEvent } from "@workglow/task-graph"; +import type { StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; import { getTaskQueueRegistry, setTaskQueueRegistry, - TaskInput, - TaskOutput, TaskQueueRegistry, } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; diff --git a/packages/test/src/test/ai/SessionCaching.test.ts b/packages/test/src/test/ai/SessionCaching.test.ts index 934f8c927..835234966 100644 --- a/packages/test/src/test/ai/SessionCaching.test.ts +++ b/packages/test/src/test/ai/SessionCaching.test.ts @@ -22,8 +22,7 @@ import { getAiProviderRegistry, setAiProviderRegistry, } from "@workglow/ai"; -import type { StreamEvent } from "@workglow/task-graph"; -import { TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; import { makeFingerprint, setLogger } from "@workglow/util"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/ai/StreamingAiTaskPhases.test.ts b/packages/test/src/test/ai/StreamingAiTaskPhases.test.ts index 78097ff6a..61a6e7480 100644 --- a/packages/test/src/test/ai/StreamingAiTaskPhases.test.ts +++ b/packages/test/src/test/ai/StreamingAiTaskPhases.test.ts @@ -4,10 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { AiProviderRunFn } from "@workglow/ai"; +import type { AiJobInput, AiProviderRunFn } from "@workglow/ai"; import { AiJob, - AiJobInput, AiProviderRegistry, getAiProviderRegistry, setAiProviderRegistry, @@ -22,11 +21,10 @@ import { RateLimiter, wrapQueueStorage, } from "@workglow/job-queue"; +import type { TaskInput, TaskOutput } from "@workglow/task-graph"; import { getTaskQueueRegistry, setTaskQueueRegistry, - TaskInput, - TaskOutput, TaskQueueRegistry, } from "@workglow/task-graph"; import { ResourceScope, setLogger } from "@workglow/util"; diff --git a/packages/test/src/test/helpers/createSqliteKnowledgeBase.ts b/packages/test/src/test/helpers/createSqliteKnowledgeBase.ts index af03a22df..30836eaa4 100644 --- a/packages/test/src/test/helpers/createSqliteKnowledgeBase.ts +++ b/packages/test/src/test/helpers/createSqliteKnowledgeBase.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { ChunkVectorEntity } from "@workglow/knowledge-base"; import { - ChunkVectorEntity, ChunkVectorPrimaryKey, ChunkVectorStorageSchema, DocumentStorageKey, diff --git a/packages/test/src/test/job-queue/PostgresJobQueue.integration.test.ts b/packages/test/src/test/job-queue/PostgresJobQueue.integration.test.ts index 50aa12735..12550b650 100644 --- a/packages/test/src/test/job-queue/PostgresJobQueue.integration.test.ts +++ b/packages/test/src/test/job-queue/PostgresJobQueue.integration.test.ts @@ -8,7 +8,7 @@ import { PGlite } from "@electric-sql/pglite"; import { RateLimiter } from "@workglow/job-queue"; import { PostgresQueueStorage, PostgresRateLimiterStorage } from "@workglow/postgres/job-queue"; import { setLogger } from "@workglow/util"; -import { Pool } from "pg"; +import type { Pool } from "pg"; import { afterAll, describe } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; import { runGenericJobQueueTests } from "./genericJobQueueTests"; diff --git a/packages/test/src/test/job-queue/PostgresPrefixedQueueStorage.integration.test.ts b/packages/test/src/test/job-queue/PostgresPrefixedQueueStorage.integration.test.ts index 5dc0f200a..18b16ceba 100644 --- a/packages/test/src/test/job-queue/PostgresPrefixedQueueStorage.integration.test.ts +++ b/packages/test/src/test/job-queue/PostgresPrefixedQueueStorage.integration.test.ts @@ -7,7 +7,7 @@ import { PGlite } from "@electric-sql/pglite"; import { PostgresQueueStorage } from "@workglow/postgres/job-queue"; import { setLogger } from "@workglow/util"; -import { Pool } from "pg"; +import type { Pool } from "pg"; import { afterAll, describe } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; import { runGenericPrefixedQueueStorageTests } from "./genericPrefixedQueueStorageTests"; diff --git a/packages/test/src/test/job-queue/genericJobQueueTests.ts b/packages/test/src/test/job-queue/genericJobQueueTests.ts index c66b3bb1f..feede12e9 100644 --- a/packages/test/src/test/job-queue/genericJobQueueTests.ts +++ b/packages/test/src/test/job-queue/genericJobQueueTests.ts @@ -4,11 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { IQueueStorage, JobHandle, JobStorageFormat } from "@workglow/job-queue"; -import { - AbortSignalJobError, +import type { IJobExecuteContext, ILimiter, + IQueueStorage, + JobHandle, + JobStorageFormat, +} from "@workglow/job-queue"; +import { + AbortSignalJobError, Job, JobError, JobQueueClient, diff --git a/packages/test/src/test/mcp/mcp-server-registry.test.ts b/packages/test/src/test/mcp/mcp-server-registry.test.ts index 40d536f4e..8ddd007dd 100644 --- a/packages/test/src/test/mcp/mcp-server-registry.test.ts +++ b/packages/test/src/test/mcp/mcp-server-registry.test.ts @@ -5,7 +5,7 @@ */ import { McpListTask, McpToolCallTask } from "@workglow/mcp/tasks"; -import type { McpServerRecord } from "@workglow/mcp/util"; +import type { McpServerRecord, McpServerRepository } from "@workglow/mcp/util"; import { getGlobalMcpServerRepository, getGlobalMcpServers, @@ -14,7 +14,6 @@ import { InMemoryMcpServerRepository, MCP_SERVERS, mcpClientFactory, - McpServerRepository, registerMcpServer, setGlobalMcpServerRepository, } from "@workglow/mcp/util"; diff --git a/packages/test/src/test/rag/DocumentChunkRetrievalTask.test.ts b/packages/test/src/test/rag/DocumentChunkRetrievalTask.test.ts index 098051a93..7649d06ce 100644 --- a/packages/test/src/test/rag/DocumentChunkRetrievalTask.test.ts +++ b/packages/test/src/test/rag/DocumentChunkRetrievalTask.test.ts @@ -5,11 +5,8 @@ */ import { chunkRetrieval } from "@workglow/ai"; -import { - createKnowledgeBase, - KnowledgeBase, - registerKnowledgeBase, -} from "@workglow/knowledge-base"; +import type { KnowledgeBase } from "@workglow/knowledge-base"; +import { createKnowledgeBase, registerKnowledgeBase } from "@workglow/knowledge-base"; import { setLogger, uuid4 } from "@workglow/util"; import { afterEach, beforeEach, describe, expect, test } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/rag/DocumentChunkUpsertTask.test.ts b/packages/test/src/test/rag/DocumentChunkUpsertTask.test.ts index 2ac14f6e2..27045ea94 100644 --- a/packages/test/src/test/rag/DocumentChunkUpsertTask.test.ts +++ b/packages/test/src/test/rag/DocumentChunkUpsertTask.test.ts @@ -5,12 +5,8 @@ */ import { ChunkVectorUpsertTask } from "@workglow/ai"; -import type { ChunkRecord } from "@workglow/knowledge-base"; -import { - createKnowledgeBase, - KnowledgeBase, - registerKnowledgeBase, -} from "@workglow/knowledge-base"; +import type { ChunkRecord, KnowledgeBase } from "@workglow/knowledge-base"; +import { createKnowledgeBase, registerKnowledgeBase } from "@workglow/knowledge-base"; import { setLogger, uuid4 } from "@workglow/util"; import { afterEach, beforeEach, describe, expect, test } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/rag/DocumentUpsertTask.test.ts b/packages/test/src/test/rag/DocumentUpsertTask.test.ts index 054e66bd3..2c15a7a79 100644 --- a/packages/test/src/test/rag/DocumentUpsertTask.test.ts +++ b/packages/test/src/test/rag/DocumentUpsertTask.test.ts @@ -6,8 +6,8 @@ import "@workglow/ai"; // Trigger Workflow prototype extensions import { documentUpsert } from "@workglow/ai"; -import type { DocumentMetadata } from "@workglow/knowledge-base"; -import { createKnowledgeBase, KnowledgeBase, StructuralParser } from "@workglow/knowledge-base"; +import type { DocumentMetadata, KnowledgeBase } from "@workglow/knowledge-base"; +import { createKnowledgeBase, StructuralParser } from "@workglow/knowledge-base"; import { setLogger, uuid4 } from "@workglow/util"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/rag/EndToEnd.integration.test.ts b/packages/test/src/test/rag/EndToEnd.integration.test.ts index c798b8ac7..85016b2cf 100644 --- a/packages/test/src/test/rag/EndToEnd.integration.test.ts +++ b/packages/test/src/test/rag/EndToEnd.integration.test.ts @@ -22,20 +22,20 @@ * 5. HierarchyJoinTask - Enrich results with document hierarchy context */ -import { +import type { ChunkRetrievalTaskOutput, ContextBuilderTaskOutput, HierarchyJoinTaskOutput, - InMemoryModelRepository, QueryExpanderTaskOutput, RerankerTaskOutput, - setGlobalModelRepository, } from "@workglow/ai"; +import { InMemoryModelRepository, setGlobalModelRepository } from "@workglow/ai"; import { clearPipelineCache, registerHuggingFaceTransformersInline, } from "@workglow/huggingface-transformers/ai-runtime"; -import { createKnowledgeBase, KnowledgeBase } from "@workglow/knowledge-base"; +import type { KnowledgeBase } from "@workglow/knowledge-base"; +import { createKnowledgeBase } from "@workglow/knowledge-base"; import { getTaskQueueRegistry, setTaskQueueRegistry, Workflow } from "@workglow/task-graph"; import { ResourceScope, setLogger } from "@workglow/util"; import { join } from "path"; diff --git a/packages/test/src/test/rag/FullChain.test.ts b/packages/test/src/test/rag/FullChain.test.ts index d04aac16c..7037f5160 100644 --- a/packages/test/src/test/rag/FullChain.test.ts +++ b/packages/test/src/test/rag/FullChain.test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { HierarchicalChunkerTaskOutput } from "@workglow/ai"; -import { ChunkRecord } from "@workglow/knowledge-base"; +import type { HierarchicalChunkerTaskOutput } from "@workglow/ai"; +import type { ChunkRecord } from "@workglow/knowledge-base"; import { Workflow } from "@workglow/task-graph"; import { setLogger, uuid4 } from "@workglow/util"; import { beforeAll, describe, expect, it } from "vitest"; diff --git a/packages/test/src/test/rag/RagWorkflow.integration.test.ts b/packages/test/src/test/rag/RagWorkflow.integration.test.ts index f71d42f8b..c31147ac0 100644 --- a/packages/test/src/test/rag/RagWorkflow.integration.test.ts +++ b/packages/test/src/test/rag/RagWorkflow.integration.test.ts @@ -16,20 +16,23 @@ * - Xenova/distilbert-base-uncased-distilled-squad (Question Answering) */ +import type { + ChunkRetrievalTaskOutput, + TextQuestionAnswerTaskOutput, + VectorStoreUpsertTaskOutput, +} from "@workglow/ai"; import { chunkRetrieval, - ChunkRetrievalTaskOutput, InMemoryModelRepository, setGlobalModelRepository, textQuestionAnswer, - TextQuestionAnswerTaskOutput, - VectorStoreUpsertTaskOutput, } from "@workglow/ai"; import { clearPipelineCache, registerHuggingFaceTransformersInline, } from "@workglow/huggingface-transformers/ai-runtime"; -import { createKnowledgeBase, KnowledgeBase } from "@workglow/knowledge-base"; +import type { KnowledgeBase } from "@workglow/knowledge-base"; +import { createKnowledgeBase } from "@workglow/knowledge-base"; import { getTaskQueueRegistry, setTaskQueueRegistry, Workflow } from "@workglow/task-graph"; import { ResourceScope, setLogger } from "@workglow/util"; import { readdirSync } from "fs"; diff --git a/packages/test/src/test/storage-kv/genericKvRepositoryTests.ts b/packages/test/src/test/storage-kv/genericKvRepositoryTests.ts index c6ad1b745..dc4199278 100644 --- a/packages/test/src/test/storage-kv/genericKvRepositoryTests.ts +++ b/packages/test/src/test/storage-kv/genericKvRepositoryTests.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { DefaultKeyValueSchema, IKvStorage } from "@workglow/storage"; -import { FromSchema, JsonSchema } from "@workglow/util/schema"; +import type { DefaultKeyValueSchema, IKvStorage } from "@workglow/storage"; +import type { FromSchema, JsonSchema } from "@workglow/util/schema"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; export function runGenericKvRepositoryTests( diff --git a/packages/test/src/test/storage-tabular/genericTabularStorageSubscriptionTests.ts b/packages/test/src/test/storage-tabular/genericTabularStorageSubscriptionTests.ts index 686d9c012..df7e1a137 100644 --- a/packages/test/src/test/storage-tabular/genericTabularStorageSubscriptionTests.ts +++ b/packages/test/src/test/storage-tabular/genericTabularStorageSubscriptionTests.ts @@ -4,11 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ITabularStorage, TabularChangePayload } from "@workglow/storage"; +import type { ITabularStorage, TabularChangePayload } from "@workglow/storage"; import { sleep } from "@workglow/util"; -import { FromSchema } from "@workglow/util/schema"; +import type { FromSchema } from "@workglow/util/schema"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; -import { CompoundPrimaryKeyNames, CompoundSchema } from "./genericTabularStorageTests"; +import type { CompoundPrimaryKeyNames, CompoundSchema } from "./genericTabularStorageTests"; /** * Generic tests for tabular repository subscription functionality diff --git a/packages/test/src/test/storage-tabular/genericTabularStorageTests.ts b/packages/test/src/test/storage-tabular/genericTabularStorageTests.ts index 66aca96be..706fb7011 100644 --- a/packages/test/src/test/storage-tabular/genericTabularStorageTests.ts +++ b/packages/test/src/test/storage-tabular/genericTabularStorageTests.ts @@ -4,13 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - ITabularStorage, - PageCursor, - StorageUnsupportedError, - StorageValidationError, -} from "@workglow/storage"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/schema"; +import type { ITabularStorage, PageCursor } from "@workglow/storage"; +import { StorageUnsupportedError, StorageValidationError } from "@workglow/storage"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/schema"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; export const PAYLOADS = [ diff --git a/packages/test/src/test/storage-util/HybridSubscriptionManager.integration.test.ts b/packages/test/src/test/storage-util/HybridSubscriptionManager.integration.test.ts index 73c4a9e42..01b9e89f7 100644 --- a/packages/test/src/test/storage-util/HybridSubscriptionManager.integration.test.ts +++ b/packages/test/src/test/storage-util/HybridSubscriptionManager.integration.test.ts @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ChangePayloadFactory, HybridSubscriptionManager } from "@workglow/storage"; +import type { ChangePayloadFactory } from "@workglow/storage"; +import { HybridSubscriptionManager } from "@workglow/storage"; import { setLogger, sleep } from "@workglow/util"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/storage-util/IndexedDbTable.migration.integration.test.ts b/packages/test/src/test/storage-util/IndexedDbTable.migration.integration.test.ts index 9cc6cfea7..546d81dd4 100644 --- a/packages/test/src/test/storage-util/IndexedDbTable.migration.integration.test.ts +++ b/packages/test/src/test/storage-util/IndexedDbTable.migration.integration.test.ts @@ -4,11 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - dropIndexedDbTable, - ensureIndexedDbTable, - ExpectedIndexDefinition, -} from "@workglow/indexeddb/storage"; +import type { ExpectedIndexDefinition } from "@workglow/indexeddb/storage"; +import { dropIndexedDbTable, ensureIndexedDbTable } from "@workglow/indexeddb/storage"; import { setLogger } from "@workglow/util"; import "fake-indexeddb/auto"; import { afterEach, describe, expect, it } from "vitest"; diff --git a/packages/test/src/test/task-graph-job-queue/InMemoryTaskGraphJobQueue.test.ts b/packages/test/src/test/task-graph-job-queue/InMemoryTaskGraphJobQueue.test.ts index 88c853ae4..d2fddcc7a 100644 --- a/packages/test/src/test/task-graph-job-queue/InMemoryTaskGraphJobQueue.test.ts +++ b/packages/test/src/test/task-graph-job-queue/InMemoryTaskGraphJobQueue.test.ts @@ -11,7 +11,7 @@ import { JobQueueServer, wrapQueueStorage, } from "@workglow/job-queue"; -import { TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { TaskInput, TaskOutput } from "@workglow/task-graph"; import { setLogger, uuid4 } from "@workglow/util"; import { describe } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph-job-queue/IndexedDbTaskGraphJobQueue.integration.test.ts b/packages/test/src/test/task-graph-job-queue/IndexedDbTaskGraphJobQueue.integration.test.ts index b9830f927..75f309026 100644 --- a/packages/test/src/test/task-graph-job-queue/IndexedDbTaskGraphJobQueue.integration.test.ts +++ b/packages/test/src/test/task-graph-job-queue/IndexedDbTaskGraphJobQueue.integration.test.ts @@ -12,7 +12,7 @@ import { RateLimiter, wrapQueueStorage, } from "@workglow/job-queue"; -import { TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { TaskInput, TaskOutput } from "@workglow/task-graph"; import { setLogger, uuid4 } from "@workglow/util"; import "fake-indexeddb/auto"; import { describe } from "vitest"; diff --git a/packages/test/src/test/task-graph-job-queue/SqliteTaskGraphJobQueue.integration.test.ts b/packages/test/src/test/task-graph-job-queue/SqliteTaskGraphJobQueue.integration.test.ts index 45cbe681f..47efed57d 100644 --- a/packages/test/src/test/task-graph-job-queue/SqliteTaskGraphJobQueue.integration.test.ts +++ b/packages/test/src/test/task-graph-job-queue/SqliteTaskGraphJobQueue.integration.test.ts @@ -12,7 +12,7 @@ import { } from "@workglow/job-queue"; import { SqliteQueueStorage } from "@workglow/sqlite/job-queue"; import { Sqlite } from "@workglow/sqlite/storage"; -import { TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { TaskInput, TaskOutput } from "@workglow/task-graph"; import { setLogger, uuid4 } from "@workglow/util"; import { describe } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph-job-queue/genericTaskGraphJobQueueTests.ts b/packages/test/src/test/task-graph-job-queue/genericTaskGraphJobQueueTests.ts index 94418c0ca..a41b2e3d8 100644 --- a/packages/test/src/test/task-graph-job-queue/genericTaskGraphJobQueueTests.ts +++ b/packages/test/src/test/task-graph-job-queue/genericTaskGraphJobQueueTests.ts @@ -6,11 +6,16 @@ import type { IJobExecuteContext } from "@workglow/job-queue"; import { Job } from "@workglow/job-queue"; -import type { IExecuteContext, TaskConfig, TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { + IExecuteContext, + RegisteredQueue, + TaskConfig, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { getTaskQueueRegistry, JobTaskFailedError, - RegisteredQueue, Task, TaskConfigSchema, } from "@workglow/task-graph"; diff --git a/packages/test/src/test/task-graph-output-cache/FileTaskOutputRepository.integration.test.ts b/packages/test/src/test/task-graph-output-cache/FileTaskOutputRepository.integration.test.ts index 42bc00f89..bfb3c94c9 100644 --- a/packages/test/src/test/task-graph-output-cache/FileTaskOutputRepository.integration.test.ts +++ b/packages/test/src/test/task-graph-output-cache/FileTaskOutputRepository.integration.test.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { TaskInput, TaskOutput } from "@workglow/task-graph"; import { setLogger } from "@workglow/util"; import { rmSync } from "node:fs"; import { beforeEach, describe, expect, it } from "vitest"; diff --git a/packages/test/src/test/task-graph-output-cache/StreamingCache.test.ts b/packages/test/src/test/task-graph-output-cache/StreamingCache.test.ts index 031031cc7..848aa606b 100644 --- a/packages/test/src/test/task-graph-output-cache/StreamingCache.test.ts +++ b/packages/test/src/test/task-graph-output-cache/StreamingCache.test.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy, StreamEvent } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskStatus } from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, StreamEvent } from "@workglow/task-graph"; +import { Task, TaskStatus } from "@workglow/task-graph"; import { setLogger } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { beforeEach, describe, expect, it } from "vitest"; import { InMemoryTaskOutputRepository } from "../../binding/InMemoryTaskOutputRepository"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph-output-cache/genericTaskOutputRepositoryTests.ts b/packages/test/src/test/task-graph-output-cache/genericTaskOutputRepositoryTests.ts index 0a4d676a7..8779c7737 100644 --- a/packages/test/src/test/task-graph-output-cache/genericTaskOutputRepositoryTests.ts +++ b/packages/test/src/test/task-graph-output-cache/genericTaskOutputRepositoryTests.ts @@ -4,12 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - TaskInput, - TaskOutput, - TaskOutputRepository, - TaskOutputTabularRepository, -} from "@workglow/task-graph"; +import type { TaskInput, TaskOutput, TaskOutputRepository } from "@workglow/task-graph"; +import { TaskOutputTabularRepository } from "@workglow/task-graph"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; const mock = vi.fn; diff --git a/packages/test/src/test/task-graph-storage/genericTaskGraphRepositoryTests.ts b/packages/test/src/test/task-graph-storage/genericTaskGraphRepositoryTests.ts index 5ee29cab3..d1e97aed8 100644 --- a/packages/test/src/test/task-graph-storage/genericTaskGraphRepositoryTests.ts +++ b/packages/test/src/test/task-graph-storage/genericTaskGraphRepositoryTests.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { TaskGraphRepository } from "@workglow/task-graph"; import { Dataflow, TaskGraph, - TaskGraphRepository, TaskGraphTabularRepository, TaskRegistry, } from "@workglow/task-graph"; diff --git a/packages/test/src/test/task-graph/BinaryCacheIntegrity.test.ts b/packages/test/src/test/task-graph/BinaryCacheIntegrity.test.ts index ab89f2136..8d5b4771e 100644 --- a/packages/test/src/test/task-graph/BinaryCacheIntegrity.test.ts +++ b/packages/test/src/test/task-graph/BinaryCacheIntegrity.test.ts @@ -3,12 +3,11 @@ * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ -import type { StreamEvent } from "@workglow/task-graph"; +import type { IExecuteContext, StreamEvent } from "@workglow/task-graph"; import { CACHE_REGISTRY, DefaultCacheRegistry, FsFolderTaskOutputRepository, - IExecuteContext, isCacheRef, StreamPump, Task, diff --git a/packages/test/src/test/task-graph/BinaryStreamRouterSinkFailure.test.ts b/packages/test/src/test/task-graph/BinaryStreamRouterSinkFailure.test.ts index e1c5eea1c..8b4ebea49 100644 --- a/packages/test/src/test/task-graph/BinaryStreamRouterSinkFailure.test.ts +++ b/packages/test/src/test/task-graph/BinaryStreamRouterSinkFailure.test.ts @@ -12,10 +12,10 @@ * of hanging forever on a gate nothing will ever drain. */ -import type { BinaryRefSink, StreamEvent, StreamSink } from "@workglow/task-graph"; -import { BinaryStreamRouter, IExecuteContext, makeCacheRef, Task } from "@workglow/task-graph"; +import type { BinaryRefSink, IExecuteContext, StreamEvent, StreamSink } from "@workglow/task-graph"; +import { BinaryStreamRouter, makeCacheRef, Task } from "@workglow/task-graph"; import { sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; describe("BinaryStreamRouter — sink failure surfaces to the producer", () => { diff --git a/packages/test/src/test/task-graph/CacheFormatlessBinaryPort.test.ts b/packages/test/src/test/task-graph/CacheFormatlessBinaryPort.test.ts index c7f72e2f4..a47c355f1 100644 --- a/packages/test/src/test/task-graph/CacheFormatlessBinaryPort.test.ts +++ b/packages/test/src/test/task-graph/CacheFormatlessBinaryPort.test.ts @@ -14,7 +14,7 @@ import type { StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; import { Task, TaskOutputRepository, TaskStatus } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; /** Row repo that JSON round-trips every row, like real JSON-column backings. */ diff --git a/packages/test/src/test/task-graph/CacheHitReplay.test.ts b/packages/test/src/test/task-graph/CacheHitReplay.test.ts index 5e7da1a7e..39dfafd88 100644 --- a/packages/test/src/test/task-graph/CacheHitReplay.test.ts +++ b/packages/test/src/test/task-graph/CacheHitReplay.test.ts @@ -3,13 +3,12 @@ * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy, StreamEvent } from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, StreamEvent } from "@workglow/task-graph"; import { CACHE_REGISTRY, Dataflow, DefaultCacheRegistry, FsFolderTaskOutputRepository, - IExecuteContext, isCacheRef, Task, TaskGraph, diff --git a/packages/test/src/test/task-graph/CacheHitReplayParity.test.ts b/packages/test/src/test/task-graph/CacheHitReplayParity.test.ts index 8e941b710..3a3e094ae 100644 --- a/packages/test/src/test/task-graph/CacheHitReplayParity.test.ts +++ b/packages/test/src/test/task-graph/CacheHitReplayParity.test.ts @@ -15,17 +15,22 @@ * `object` modes. */ -import type { CacheRef, StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { + CacheRef, + IExecuteContext, + StreamEvent, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { Dataflow, - IExecuteContext, makeCacheRef, Task, TaskGraph, TaskGraphRunner, TaskOutputRepository, } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { beforeEach, describe, expect, it } from "vitest"; class StreamPortMemoryRepo extends TaskOutputRepository { diff --git a/packages/test/src/test/task-graph/CacheStreamReplayFailure.test.ts b/packages/test/src/test/task-graph/CacheStreamReplayFailure.test.ts index 812a800bb..890e69050 100644 --- a/packages/test/src/test/task-graph/CacheStreamReplayFailure.test.ts +++ b/packages/test/src/test/task-graph/CacheStreamReplayFailure.test.ts @@ -19,7 +19,7 @@ import type { CacheRef, StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; import { makeCacheRef, Task, TaskOutputRepository, TaskStatus } from "@workglow/task-graph"; import { setLogger } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph/CompoundStreamOptionForwarding.test.ts b/packages/test/src/test/task-graph/CompoundStreamOptionForwarding.test.ts index 5ea314650..79dd31f77 100644 --- a/packages/test/src/test/task-graph/CompoundStreamOptionForwarding.test.ts +++ b/packages/test/src/test/task-graph/CompoundStreamOptionForwarding.test.ts @@ -24,7 +24,7 @@ import { TaskGraph, WhileTask, } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; class AddOneTask extends Task<{ value: number }, { value: number }> { diff --git a/packages/test/src/test/task-graph/Entitlements.test.ts b/packages/test/src/test/task-graph/Entitlements.test.ts index b1bcd6000..d137bb3e5 100644 --- a/packages/test/src/test/task-graph/Entitlements.test.ts +++ b/packages/test/src/test/task-graph/Entitlements.test.ts @@ -32,7 +32,7 @@ import { type TaskEntitlements, } from "@workglow/task-graph"; import { Container, ServiceRegistry, setLogger } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph/GraphFormatScanner.test.ts b/packages/test/src/test/task-graph/GraphFormatScanner.test.ts index cc86db657..db6fc6b37 100644 --- a/packages/test/src/test/task-graph/GraphFormatScanner.test.ts +++ b/packages/test/src/test/task-graph/GraphFormatScanner.test.ts @@ -6,7 +6,7 @@ import { scanGraphForCredentials, scanGraphForFormat, Task, TaskGraph } from "@workglow/task-graph"; import { setLogger } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph/GraphToWorkflowCode.test.ts b/packages/test/src/test/task-graph/GraphToWorkflowCode.test.ts index 2bd6bf45f..f0aca3135 100644 --- a/packages/test/src/test/task-graph/GraphToWorkflowCode.test.ts +++ b/packages/test/src/test/task-graph/GraphToWorkflowCode.test.ts @@ -4,14 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { MapTask, ReduceTask, WhileTask } from "@workglow/task-graph"; import { Dataflow, graphToWorkflowCode, - MapTask, - ReduceTask, resetMethodNameCache, TaskGraph, - WhileTask, Workflow, } from "@workglow/task-graph"; import { deepEqual, setLogger } from "@workglow/util"; diff --git a/packages/test/src/test/task-graph/InputResolver.test.ts b/packages/test/src/test/task-graph/InputResolver.test.ts index a7bdad13b..c4ae4831f 100644 --- a/packages/test/src/test/task-graph/InputResolver.test.ts +++ b/packages/test/src/test/task-graph/InputResolver.test.ts @@ -5,13 +5,14 @@ */ import { TypeTabularStorage } from "@workglow/knowledge-base"; +import type { AnyTabularStorage } from "@workglow/storage"; import { - AnyTabularStorage, getGlobalTabularRepositories, InMemoryTabularStorage, registerTabularRepository, } from "@workglow/storage"; -import { IExecuteContext, resolveSchemaInputs, Task, TaskRegistry } from "@workglow/task-graph"; +import type { IExecuteContext } from "@workglow/task-graph"; +import { resolveSchemaInputs, Task, TaskRegistry } from "@workglow/task-graph"; import { getInputResolvers, globalServiceRegistry, diff --git a/packages/test/src/test/task-graph/NoAccumulationCacheableConsumer.test.ts b/packages/test/src/test/task-graph/NoAccumulationCacheableConsumer.test.ts index b84b6f141..361c5fa6b 100644 --- a/packages/test/src/test/task-graph/NoAccumulationCacheableConsumer.test.ts +++ b/packages/test/src/test/task-graph/NoAccumulationCacheableConsumer.test.ts @@ -18,10 +18,15 @@ * sink map, so the streamed output survives. */ -import type { CacheRef, StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { + CacheRef, + IExecuteContext, + StreamEvent, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { Dataflow, - IExecuteContext, isCacheRef, makeCacheRef, Task, @@ -30,7 +35,7 @@ import { TaskOutputRepository, TaskStatus, } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; class StreamPortMemoryRepo extends TaskOutputRepository { diff --git a/packages/test/src/test/task-graph/NoAccumulationPassthrough.test.ts b/packages/test/src/test/task-graph/NoAccumulationPassthrough.test.ts index 2845916b2..22cedb037 100644 --- a/packages/test/src/test/task-graph/NoAccumulationPassthrough.test.ts +++ b/packages/test/src/test/task-graph/NoAccumulationPassthrough.test.ts @@ -17,10 +17,15 @@ * materializes the accumulated string. */ -import type { CacheRef, StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { + CacheRef, + IExecuteContext, + StreamEvent, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { Dataflow, - IExecuteContext, isCacheRef, makeCacheRef, Task, @@ -28,7 +33,7 @@ import { TaskGraphRunner, TaskOutputRepository, } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; // -------------------------------------------------------------------------- diff --git a/packages/test/src/test/task-graph/PassthroughWatchdogIdle.test.ts b/packages/test/src/test/task-graph/PassthroughWatchdogIdle.test.ts index 60f0b54c9..2eef4c2f1 100644 --- a/packages/test/src/test/task-graph/PassthroughWatchdogIdle.test.ts +++ b/packages/test/src/test/task-graph/PassthroughWatchdogIdle.test.ts @@ -13,11 +13,16 @@ * that IS above the mark with no pull/credit progress still trips. */ -import type { CacheRef, StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { + CacheRef, + IExecuteContext, + StreamEvent, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { BackpressureGate, Dataflow, - IExecuteContext, makeCacheRef, Task, TaskGraph, @@ -25,7 +30,7 @@ import { TaskOutputRepository, } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph/PerPortSinks.test.ts b/packages/test/src/test/task-graph/PerPortSinks.test.ts index c038ca514..55dbaf03f 100644 --- a/packages/test/src/test/task-graph/PerPortSinks.test.ts +++ b/packages/test/src/test/task-graph/PerPortSinks.test.ts @@ -12,16 +12,10 @@ * port dropped, no in-memory materialization of the sunk bytes required. */ -import type { CacheRef, StreamEvent, StreamSink } from "@workglow/task-graph"; -import { - IExecuteContext, - isCacheRef, - makeCacheRef, - Task, - TaskRegistry, -} from "@workglow/task-graph"; +import type { CacheRef, IExecuteContext, StreamEvent, StreamSink } from "@workglow/task-graph"; +import { isCacheRef, makeCacheRef, Task, TaskRegistry } from "@workglow/task-graph"; import { sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { beforeAll, describe, expect, it } from "vitest"; type MixedOut = { text: string; bytes: Blob }; diff --git a/packages/test/src/test/task-graph/ProgressEvents.test.ts b/packages/test/src/test/task-graph/ProgressEvents.test.ts index 955c23527..c01319d67 100644 --- a/packages/test/src/test/task-graph/ProgressEvents.test.ts +++ b/packages/test/src/test/task-graph/ProgressEvents.test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy, IExecuteContext, StreamEvent } from "@workglow/task-graph"; -import { Task, TaskAbortedError, TaskInput, TaskStatus } from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, StreamEvent, TaskInput } from "@workglow/task-graph"; +import { Task, TaskAbortedError, TaskStatus } from "@workglow/task-graph"; import { sleep } from "@workglow/util"; import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; diff --git a/packages/test/src/test/task-graph/QueueRowAndRehydrate.test.ts b/packages/test/src/test/task-graph/QueueRowAndRehydrate.test.ts index 0b70920af..77364d393 100644 --- a/packages/test/src/test/task-graph/QueueRowAndRehydrate.test.ts +++ b/packages/test/src/test/task-graph/QueueRowAndRehydrate.test.ts @@ -6,6 +6,7 @@ import type { CacheRef, + IExecuteContext, JobHandleLike, StreamEvent, TaskInput, @@ -14,7 +15,6 @@ import type { import { CACHE_REGISTRY, DefaultCacheRegistry, - IExecuteContext, isCacheRef, makeCacheRef, resolveJobOutput, @@ -23,7 +23,7 @@ import { TaskRegistry, } from "@workglow/task-graph"; import { Container, ServiceRegistry, sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { beforeAll, beforeEach, describe, expect, it } from "vitest"; type BinOut = { bytes: Blob }; diff --git a/packages/test/src/test/task-graph/ReplaceMode.test.ts b/packages/test/src/test/task-graph/ReplaceMode.test.ts index b7923fce0..793ebc753 100644 --- a/packages/test/src/test/task-graph/ReplaceMode.test.ts +++ b/packages/test/src/test/task-graph/ReplaceMode.test.ts @@ -19,7 +19,7 @@ import { type IRunConfig, Task, } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; type In = { prompt: string }; diff --git a/packages/test/src/test/task-graph/ReplaceModeRefusal.test.ts b/packages/test/src/test/task-graph/ReplaceModeRefusal.test.ts index 134615a33..34fcc8f6e 100644 --- a/packages/test/src/test/task-graph/ReplaceModeRefusal.test.ts +++ b/packages/test/src/test/task-graph/ReplaceModeRefusal.test.ts @@ -14,7 +14,7 @@ import type { StreamEvent } from "@workglow/task-graph"; import { Task, TaskStatus } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; type ReplaceOut = { answer?: string; refusal?: string; refusalCategory?: string }; diff --git a/packages/test/src/test/task-graph/ResourceScope.test.ts b/packages/test/src/test/task-graph/ResourceScope.test.ts index cfaf8b80f..7c7a25ca1 100644 --- a/packages/test/src/test/task-graph/ResourceScope.test.ts +++ b/packages/test/src/test/task-graph/ResourceScope.test.ts @@ -4,16 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - IExecuteContext, - Task, - TaskGraph, - TaskInput, - TaskOutput, - Workflow, -} from "@workglow/task-graph"; +import type { IExecuteContext, TaskInput, TaskOutput } from "@workglow/task-graph"; +import { Task, TaskGraph, Workflow } from "@workglow/task-graph"; import { ResourceScope } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; // A task that registers a disposer on the resource scope diff --git a/packages/test/src/test/task-graph/StaleInputStreamsRerun.test.ts b/packages/test/src/test/task-graph/StaleInputStreamsRerun.test.ts index 661beed41..bda720dd5 100644 --- a/packages/test/src/test/task-graph/StaleInputStreamsRerun.test.ts +++ b/packages/test/src/test/task-graph/StaleInputStreamsRerun.test.ts @@ -16,16 +16,15 @@ * back to its settled input slot. */ -import type { StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { IExecuteContext, StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; import { Dataflow, - IExecuteContext, Task, TaskGraph, TaskGraphRunner, TaskOutputRepository, } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; /** Plain non-streaming row repo (no by-ref surface, no stream sinks). */ diff --git a/packages/test/src/test/task-graph/StreamBackpressureEngaged.test.ts b/packages/test/src/test/task-graph/StreamBackpressureEngaged.test.ts index 8a249a64b..3909be8e7 100644 --- a/packages/test/src/test/task-graph/StreamBackpressureEngaged.test.ts +++ b/packages/test/src/test/task-graph/StreamBackpressureEngaged.test.ts @@ -17,10 +17,15 @@ * the pre-change behavior. */ -import type { CacheRef, StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { + CacheRef, + IExecuteContext, + StreamEvent, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { Dataflow, - IExecuteContext, isCacheRef, makeCacheRef, Task, @@ -29,7 +34,7 @@ import { TaskOutputRepository, } from "@workglow/task-graph"; import { sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; const CHUNK_BYTES = 64; diff --git a/packages/test/src/test/task-graph/StreamBinaryProcessor.test.ts b/packages/test/src/test/task-graph/StreamBinaryProcessor.test.ts index d97534e46..6c1555224 100644 --- a/packages/test/src/test/task-graph/StreamBinaryProcessor.test.ts +++ b/packages/test/src/test/task-graph/StreamBinaryProcessor.test.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { StreamEvent } from "@workglow/task-graph"; -import { IExecuteContext, Task, TaskRegistry } from "@workglow/task-graph"; +import type { IExecuteContext, StreamEvent } from "@workglow/task-graph"; +import { Task, TaskRegistry } from "@workglow/task-graph"; import { sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { beforeAll, describe, expect, it } from "vitest"; type BinOut = { bytes: Blob | ArrayBuffer }; diff --git a/packages/test/src/test/task-graph/StreamBinaryPump.test.ts b/packages/test/src/test/task-graph/StreamBinaryPump.test.ts index 8694189b4..2bbaa1154 100644 --- a/packages/test/src/test/task-graph/StreamBinaryPump.test.ts +++ b/packages/test/src/test/task-graph/StreamBinaryPump.test.ts @@ -22,10 +22,15 @@ * `StreamProcessorBinaryRefSink.test.ts` / `TaskRunnerRefPath.test.ts`. */ -import type { CacheRef, StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { + CacheRef, + IExecuteContext, + StreamEvent, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { Dataflow, - IExecuteContext, makeCacheRef, StreamPump, Task, diff --git a/packages/test/src/test/task-graph/StreamInputValidationSkip.test.ts b/packages/test/src/test/task-graph/StreamInputValidationSkip.test.ts index 53c3a8446..d8a542e68 100644 --- a/packages/test/src/test/task-graph/StreamInputValidationSkip.test.ts +++ b/packages/test/src/test/task-graph/StreamInputValidationSkip.test.ts @@ -15,7 +15,7 @@ */ import { makeCacheRef, Task } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; type In = { query: string; doc: string }; diff --git a/packages/test/src/test/task-graph/StreamMixedModeFanout.test.ts b/packages/test/src/test/task-graph/StreamMixedModeFanout.test.ts index 8f2ae43fe..971196eb5 100644 --- a/packages/test/src/test/task-graph/StreamMixedModeFanout.test.ts +++ b/packages/test/src/test/task-graph/StreamMixedModeFanout.test.ts @@ -19,10 +19,15 @@ * both consumers, but only best-effort pacing (no precise gate). */ -import type { CacheRef, StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { + CacheRef, + IExecuteContext, + StreamEvent, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { Dataflow, - IExecuteContext, isCacheRef, makeCacheRef, StreamPump, @@ -32,7 +37,7 @@ import { TaskOutputRepository, } from "@workglow/task-graph"; import { sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; const CHUNKS = 30; diff --git a/packages/test/src/test/task-graph/StreamProcessorBinaryRefSink.test.ts b/packages/test/src/test/task-graph/StreamProcessorBinaryRefSink.test.ts index 48f13aabf..f050c32c0 100644 --- a/packages/test/src/test/task-graph/StreamProcessorBinaryRefSink.test.ts +++ b/packages/test/src/test/task-graph/StreamProcessorBinaryRefSink.test.ts @@ -4,16 +4,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { BinaryRefSink, CacheRef, StreamEvent, StreamSink } from "@workglow/task-graph"; -import { +import type { + BinaryRefSink, + CacheRef, IExecuteContext, - isCacheRef, - makeCacheRef, - Task, - TaskRegistry, + StreamEvent, + StreamSink, } from "@workglow/task-graph"; +import { isCacheRef, makeCacheRef, Task, TaskRegistry } from "@workglow/task-graph"; import { sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { beforeAll, describe, expect, it } from "vitest"; type BinOut = { bytes: Blob | ArrayBuffer }; diff --git a/packages/test/src/test/task-graph/StreamProcessorScaffoldNoClobber.test.ts b/packages/test/src/test/task-graph/StreamProcessorScaffoldNoClobber.test.ts index e6e6d0a6e..4d7238068 100644 --- a/packages/test/src/test/task-graph/StreamProcessorScaffoldNoClobber.test.ts +++ b/packages/test/src/test/task-graph/StreamProcessorScaffoldNoClobber.test.ts @@ -16,7 +16,7 @@ import type { StreamEvent } from "@workglow/task-graph"; import { type CachePolicy, type IExecuteContext, Task } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; type In = { prompt: string }; diff --git a/packages/test/src/test/task-graph/StreamPumpPassthroughLiveness.test.ts b/packages/test/src/test/task-graph/StreamPumpPassthroughLiveness.test.ts index b22a4c673..dd008778c 100644 --- a/packages/test/src/test/task-graph/StreamPumpPassthroughLiveness.test.ts +++ b/packages/test/src/test/task-graph/StreamPumpPassthroughLiveness.test.ts @@ -19,18 +19,23 @@ * watchdog) and the ungated regression path. */ -import type { CacheRef, StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { + CacheRef, + IExecuteContext, + StreamEvent, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { BackpressureGate, Dataflow, - IExecuteContext, makeCacheRef, Task, TaskGraph, TaskGraphRunner, TaskOutputRepository, } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; class StreamPortMemoryRepo extends TaskOutputRepository { diff --git a/packages/test/src/test/task-graph/StreamingAccumulation.test.ts b/packages/test/src/test/task-graph/StreamingAccumulation.test.ts index 354018f80..a3a58c646 100644 --- a/packages/test/src/test/task-graph/StreamingAccumulation.test.ts +++ b/packages/test/src/test/task-graph/StreamingAccumulation.test.ts @@ -24,19 +24,17 @@ * - Cache: auto-enables accumulation */ -import type { CachePolicy, StreamEvent, Usage } from "@workglow/task-graph"; -import { - Dataflow, +import type { + CachePolicy, IExecuteContext, IRunConfig, + StreamEvent, StreamFinish, - Task, - TaskGraph, - TaskGraphRunner, - TaskStatus, + Usage, } from "@workglow/task-graph"; +import { Dataflow, Task, TaskGraph, TaskGraphRunner, TaskStatus } from "@workglow/task-graph"; import { setLogger } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { beforeEach, describe, expect, it } from "vitest"; import { InMemoryTaskOutputRepository } from "../../binding/InMemoryTaskOutputRepository"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph/StreamingBackpressure.test.ts b/packages/test/src/test/task-graph/StreamingBackpressure.test.ts index 40667d6b1..2687adeb7 100644 --- a/packages/test/src/test/task-graph/StreamingBackpressure.test.ts +++ b/packages/test/src/test/task-graph/StreamingBackpressure.test.ts @@ -24,12 +24,12 @@ import type { BinaryRefSink, CachePolicy, CacheRef, + IExecuteContext, StreamEvent, StreamSink, } from "@workglow/task-graph"; import { Dataflow, - IExecuteContext, isCacheRef, makeCacheRef, Task, @@ -38,7 +38,7 @@ import { TaskStatus, } from "@workglow/task-graph"; import { setLogger } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph/TaskCompleteEvent.test.ts b/packages/test/src/test/task-graph/TaskCompleteEvent.test.ts index 36fcebfa3..1078fbe6e 100644 --- a/packages/test/src/test/task-graph/TaskCompleteEvent.test.ts +++ b/packages/test/src/test/task-graph/TaskCompleteEvent.test.ts @@ -4,13 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { IExecuteContext, StreamEvent } from "@workglow/task-graph"; +import type { IExecuteContext, MapTask, StreamEvent } from "@workglow/task-graph"; import { bridgeSubGraphTaskEvents, Dataflow, FallbackTask, GraphAsTask, - MapTask, Task, TaskGraph, TaskRegistry, diff --git a/packages/test/src/test/task-graph/TaskDefaults.test.ts b/packages/test/src/test/task-graph/TaskDefaults.test.ts index a9d12f883..ff72ec9fc 100644 --- a/packages/test/src/test/task-graph/TaskDefaults.test.ts +++ b/packages/test/src/test/task-graph/TaskDefaults.test.ts @@ -4,13 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - Task, - TaskInput, - type IExecuteContext, - type TaskConfig, - type TaskOutput, -} from "@workglow/task-graph"; +import type { IExecuteContext, TaskConfig, TaskInput, TaskOutput } from "@workglow/task-graph"; +import { Task } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; diff --git a/packages/test/src/test/task-graph/TaskGraphRunner.test.ts b/packages/test/src/test/task-graph/TaskGraphRunner.test.ts index 53715c72b..3d2b9eb24 100644 --- a/packages/test/src/test/task-graph/TaskGraphRunner.test.ts +++ b/packages/test/src/test/task-graph/TaskGraphRunner.test.ts @@ -4,17 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { AnyGraphResult, ITask, TaskOutput } from "@workglow/task-graph"; import { - AnyGraphResult, Dataflow, DataflowArrow, - ITask, TaskAbortedError, TaskConfigurationError, TaskGraph, TaskGraphRunner, TaskGraphTimeoutError, - TaskOutput, TaskStatus, } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; diff --git a/packages/test/src/test/task-graph/TaskGraphStreamEvents.test.ts b/packages/test/src/test/task-graph/TaskGraphStreamEvents.test.ts index f9ffbe43d..92e129735 100644 --- a/packages/test/src/test/task-graph/TaskGraphStreamEvents.test.ts +++ b/packages/test/src/test/task-graph/TaskGraphStreamEvents.test.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy, StreamEvent, TaskIdType } from "@workglow/task-graph"; -import { Dataflow, IExecuteContext, Task, TaskGraph, TaskGraphRunner } from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, StreamEvent, TaskIdType } from "@workglow/task-graph"; +import { Dataflow, Task, TaskGraph, TaskGraphRunner } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph/TaskGraphStreaming.test.ts b/packages/test/src/test/task-graph/TaskGraphStreaming.test.ts index 28cbda98e..523d46b24 100644 --- a/packages/test/src/test/task-graph/TaskGraphStreaming.test.ts +++ b/packages/test/src/test/task-graph/TaskGraphStreaming.test.ts @@ -4,19 +4,18 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy, StreamEvent } from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, StreamEvent } from "@workglow/task-graph"; import { Dataflow, getOutputStreamMode, GraphAsTask, - IExecuteContext, Task, TaskGraph, TaskGraphRunner, TaskStatus, } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph/TaskRegistry.test.ts b/packages/test/src/test/task-graph/TaskRegistry.test.ts index b0bdf7267..83b8c0e5a 100644 --- a/packages/test/src/test/task-graph/TaskRegistry.test.ts +++ b/packages/test/src/test/task-graph/TaskRegistry.test.ts @@ -5,7 +5,7 @@ */ import { Task, TaskRegistry } from "@workglow/task-graph"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { afterEach, describe, expect, it } from "vitest"; // Minimal task classes used only for TaskRegistry registration tests diff --git a/packages/test/src/test/task-graph/TaskRunnerRefPath.test.ts b/packages/test/src/test/task-graph/TaskRunnerRefPath.test.ts index 9cc216141..ce30c00af 100644 --- a/packages/test/src/test/task-graph/TaskRunnerRefPath.test.ts +++ b/packages/test/src/test/task-graph/TaskRunnerRefPath.test.ts @@ -4,11 +4,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CacheRef, StreamEvent, TaskInput, TaskOutput } from "@workglow/task-graph"; +import type { + CacheRef, + IExecuteContext, + StreamEvent, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { CACHE_REGISTRY, DefaultCacheRegistry, - IExecuteContext, isCacheRef, makeCacheRef, Task, @@ -16,7 +21,7 @@ import { TaskRegistry, } from "@workglow/task-graph"; import { Container, ServiceRegistry, sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { beforeAll, beforeEach, describe, expect, it } from "vitest"; type BinOut = { bytes: Blob | ArrayBuffer }; diff --git a/packages/test/src/test/task-graph/TaskSubGraphRunner.test.ts b/packages/test/src/test/task-graph/TaskSubGraphRunner.test.ts index db99e385e..b2fe94dbf 100644 --- a/packages/test/src/test/task-graph/TaskSubGraphRunner.test.ts +++ b/packages/test/src/test/task-graph/TaskSubGraphRunner.test.ts @@ -4,17 +4,19 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - Dataflow, +import type { GraphResultArray, GraphSingleTaskResult, ITask, + TaskOutput, +} from "@workglow/task-graph"; +import { + Dataflow, TaskAbortedError, TaskError, TaskFailedError, TaskGraph, TaskGraphRunner, - TaskOutput, TaskStatus, } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; diff --git a/packages/test/src/test/task-graph/TimeoutAndErrorRouting.test.ts b/packages/test/src/test/task-graph/TimeoutAndErrorRouting.test.ts index fbab55373..d0826e852 100644 --- a/packages/test/src/test/task-graph/TimeoutAndErrorRouting.test.ts +++ b/packages/test/src/test/task-graph/TimeoutAndErrorRouting.test.ts @@ -4,11 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { IExecuteContext } from "@workglow/task-graph"; import { Dataflow, DATAFLOW_ALL_PORTS, DATAFLOW_ERROR_PORT, - IExecuteContext, Task, TaskAbortedError, TaskFailedError, @@ -20,7 +20,7 @@ import { type CachePolicy, } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph/Transforms.integration.test.ts b/packages/test/src/test/task-graph/Transforms.integration.test.ts index 84efeb96b..1c500d8d1 100644 --- a/packages/test/src/test/task-graph/Transforms.integration.test.ts +++ b/packages/test/src/test/task-graph/Transforms.integration.test.ts @@ -3,10 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { StreamEvent } from "@workglow/task-graph"; +import type { IExecuteContext, StreamEvent } from "@workglow/task-graph"; import { Dataflow, - IExecuteContext, Task, TaskGraph, TaskGraphRunner, diff --git a/packages/test/src/test/task-graph/Workflow.test.ts b/packages/test/src/test/task-graph/Workflow.test.ts index f5841ab92..99c584f34 100644 --- a/packages/test/src/test/task-graph/Workflow.test.ts +++ b/packages/test/src/test/task-graph/Workflow.test.ts @@ -4,21 +4,23 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; +import type { + CachePolicy, + IExecuteContext, + StreamEvent, + TaskConfig, + TaskEntitlements, + TaskIdType, +} from "@workglow/task-graph"; import { computeGraphInputSchema, CreateWorkflow, hasVectorOutput, - IExecuteContext, MapTask, PROPERTY_ARRAY, - StreamEvent, Task, - TaskConfig, - TaskEntitlements, TaskError, TaskGraph, - TaskIdType, Workflow, WorkflowError, } from "@workglow/task-graph"; @@ -37,7 +39,7 @@ import { setLogger, sleep, } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { LongRunningTask, diff --git a/packages/test/src/test/task-graph/WorkflowStreaming.test.ts b/packages/test/src/test/task-graph/WorkflowStreaming.test.ts index 261eb278a..76f606016 100644 --- a/packages/test/src/test/task-graph/WorkflowStreaming.test.ts +++ b/packages/test/src/test/task-graph/WorkflowStreaming.test.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy, StreamEvent, TaskIdType } from "@workglow/task-graph"; -import { Dataflow, IExecuteContext, Task, Workflow } from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, StreamEvent, TaskIdType } from "@workglow/task-graph"; +import { Dataflow, Task, Workflow } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task-graph/runner-variants-no-preview-overlay.test.ts b/packages/test/src/test/task-graph/runner-variants-no-preview-overlay.test.ts index 8c0adb228..8ae3c1b3c 100644 --- a/packages/test/src/test/task-graph/runner-variants-no-preview-overlay.test.ts +++ b/packages/test/src/test/task-graph/runner-variants-no-preview-overlay.test.ts @@ -4,14 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; import { FallbackTask, GraphAsTask, - IExecuteContext, - IExecutePreviewContext, MapTask, Task, - TaskConfig, TaskGraph, WhileTask, } from "@workglow/task-graph"; diff --git a/packages/test/src/test/task/ArrayTask.test.ts b/packages/test/src/test/task/ArrayTask.test.ts index 572eb1bb2..e8fc83ad5 100644 --- a/packages/test/src/test/task/ArrayTask.test.ts +++ b/packages/test/src/test/task/ArrayTask.test.ts @@ -4,21 +4,18 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - Dataflow, +import type { IExecuteContext, ITask, - PROPERTY_ARRAY, - Task, TaskConfig, - TaskGraph, TaskInput, TaskOutput, - TaskStatus, } from "@workglow/task-graph"; +import { Dataflow, PROPERTY_ARRAY, Task, TaskGraph, TaskStatus } from "@workglow/task-graph"; import { ArrayTask } from "@workglow/tasks"; -import { ConvertAllToOptionalArray, setLogger } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { ConvertAllToOptionalArray } from "@workglow/util"; +import { setLogger } from "@workglow/util"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, test, vi } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task/FallbackTask.test.ts b/packages/test/src/test/task/FallbackTask.test.ts index c36ce0b36..73ccde4ce 100644 --- a/packages/test/src/test/task/FallbackTask.test.ts +++ b/packages/test/src/test/task/FallbackTask.test.ts @@ -4,20 +4,19 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { IExecuteContext, TaskInput } from "@workglow/task-graph"; import { FallbackTask, - IExecuteContext, Task, TaskAbortedError, TaskFailedError, TaskGraph, - TaskInput, TaskStatus, Workflow, type CachePolicy, } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, test } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task/FetchTask.test.ts b/packages/test/src/test/task/FetchTask.test.ts index 90f67a998..e72420b46 100644 --- a/packages/test/src/test/task/FetchTask.test.ts +++ b/packages/test/src/test/task/FetchTask.test.ts @@ -4,11 +4,11 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { JobError } from "@workglow/job-queue"; import { createInMemoryQueue, InMemoryQueueStorage, InMemoryRateLimiterStorage, - JobError, JobQueueClient, JobQueueServer, PermanentJobError, @@ -21,14 +21,13 @@ import { JobTaskFailedError, setTaskQueueRegistry, } from "@workglow/task-graph"; +import type { FetchUrlTaskInput, FetchUrlTaskOutput } from "@workglow/tasks"; import { createFetchUrlJobError, fetchUrl, FetchUrlErrorCode, FetchUrlJob, FetchUrlTask, - FetchUrlTaskInput, - FetchUrlTaskOutput, isFetchUrlJobError, registerSafeFetch, type SafeFetchFn, diff --git a/packages/test/src/test/task/GraphAsTask.test.ts b/packages/test/src/test/task/GraphAsTask.test.ts index 3035d1969..9f101ef93 100644 --- a/packages/test/src/test/task/GraphAsTask.test.ts +++ b/packages/test/src/test/task/GraphAsTask.test.ts @@ -4,11 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { IExecuteContext, MapTask } from "@workglow/task-graph"; import { Dataflow, GraphAsTask, - IExecuteContext, - MapTask, Task, TaskGraph, Workflow, @@ -16,7 +15,7 @@ import { } from "@workglow/task-graph"; import { InputTask, OutputTask } from "@workglow/tasks"; import { Container, ServiceRegistry, setLogger, sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { beforeEach, describe, expect, it } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task/IteratorTask.test.ts b/packages/test/src/test/task/IteratorTask.test.ts index e26a71116..d17ba796a 100644 --- a/packages/test/src/test/task/IteratorTask.test.ts +++ b/packages/test/src/test/task/IteratorTask.test.ts @@ -4,21 +4,19 @@ * SPDX-License-Identifier: Apache-2.0 */ +import type { IExecuteContext, TaskInput, TaskOutput } from "@workglow/task-graph"; import { ForEachTask, - IExecuteContext, IteratorTask, MapTask, ReduceTask, Task, TaskGraph, - TaskInput, - TaskOutput, WhileTask, Workflow, } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, test } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task/SingleTask.test.ts b/packages/test/src/test/task/SingleTask.test.ts index aec8b7b56..2d5ef9142 100644 --- a/packages/test/src/test/task/SingleTask.test.ts +++ b/packages/test/src/test/task/SingleTask.test.ts @@ -4,13 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - Task, - TaskAbortedError, - TaskConfigurationError, - TaskError, - TaskStatus, -} from "@workglow/task-graph"; +import type { TaskError } from "@workglow/task-graph"; +import { Task, TaskAbortedError, TaskConfigurationError, TaskStatus } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task/TaskRunnerStreaming.test.ts b/packages/test/src/test/task/TaskRunnerStreaming.test.ts index 27161ba40..cc3da1b21 100644 --- a/packages/test/src/test/task/TaskRunnerStreaming.test.ts +++ b/packages/test/src/test/task/TaskRunnerStreaming.test.ts @@ -4,17 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy, StreamEvent } from "@workglow/task-graph"; -import { - IExecuteContext, - IRunConfig, - Task, - TaskStatus, - getOutputStreamMode, - isTaskStreamable, -} from "@workglow/task-graph"; +import type { CachePolicy, IExecuteContext, IRunConfig, StreamEvent } from "@workglow/task-graph"; +import { Task, TaskStatus, getOutputStreamMode, isTaskStreamable } from "@workglow/task-graph"; import { setLogger, sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; import { InMemoryTaskOutputRepository } from "../../binding/InMemoryTaskOutputRepository"; import { getTestingLogger } from "../../binding/TestingLogger"; diff --git a/packages/test/src/test/task/TestTasks.ts b/packages/test/src/test/task/TestTasks.ts index 14ca70441..e1b14b477 100644 --- a/packages/test/src/test/task/TestTasks.ts +++ b/packages/test/src/test/task/TestTasks.ts @@ -4,24 +4,26 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { CachePolicy } from "@workglow/task-graph"; +import type { + CachePolicy, + IExecuteContext, + TaskConfig, + TaskInput, + TaskOutput, +} from "@workglow/task-graph"; import { CreateWorkflow, GraphAsTask, - IExecuteContext, IteratorTask, Task, TaskAbortedError, - TaskConfig, TaskError, TaskFailedError, TaskGraph, - TaskInput, - TaskOutput, Workflow, } from "@workglow/task-graph"; import { sleep } from "@workglow/util"; -import { DataPortSchema } from "@workglow/util/schema"; +import type { DataPortSchema } from "@workglow/util/schema"; export type TestIOTaskInput = { key: string; diff --git a/packages/test/src/test/task/preview-only-task-guard.test.ts b/packages/test/src/test/task/preview-only-task-guard.test.ts index 6bb0ec77f..51c598ee5 100644 --- a/packages/test/src/test/task/preview-only-task-guard.test.ts +++ b/packages/test/src/test/task/preview-only-task-guard.test.ts @@ -4,12 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - IExecutePreviewContext, - Task, - TaskConfig, - TaskConfigurationError, -} from "@workglow/task-graph"; +import type { IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { Task, TaskConfigurationError } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; diff --git a/packages/test/src/test/task/preview-return-semantics.test.ts b/packages/test/src/test/task/preview-return-semantics.test.ts index 2aaa1ef5d..815475e6c 100644 --- a/packages/test/src/test/task/preview-return-semantics.test.ts +++ b/packages/test/src/test/task/preview-return-semantics.test.ts @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { IExecutePreviewContext, Task, TaskConfig } from "@workglow/task-graph"; +import type { IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { Task } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it } from "vitest"; diff --git a/packages/test/src/test/task/run-vs-preview-isolation.test.ts b/packages/test/src/test/task/run-vs-preview-isolation.test.ts index 9a9cc947e..a89547597 100644 --- a/packages/test/src/test/task/run-vs-preview-isolation.test.ts +++ b/packages/test/src/test/task/run-vs-preview-isolation.test.ts @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { IExecuteContext, IExecutePreviewContext, Task, TaskConfig } from "@workglow/task-graph"; +import type { IExecuteContext, IExecutePreviewContext, TaskConfig } from "@workglow/task-graph"; +import { Task } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import { describe, expect, it, vi } from "vitest"; diff --git a/packages/util/src/di/ServiceRegistry.ts b/packages/util/src/di/ServiceRegistry.ts index 20aa1f3df..ee7167fbe 100644 --- a/packages/util/src/di/ServiceRegistry.ts +++ b/packages/util/src/di/ServiceRegistry.ts @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Container, globalContainer } from "./Container"; +import type { Container } from "./Container"; +import { globalContainer } from "./Container"; /** * Service token type for type-safe dependency injection diff --git a/packages/util/src/json-schema/DataPortSchema.ts b/packages/util/src/json-schema/DataPortSchema.ts index 38c385b91..d76847be8 100644 --- a/packages/util/src/json-schema/DataPortSchema.ts +++ b/packages/util/src/json-schema/DataPortSchema.ts @@ -5,7 +5,7 @@ */ import type { JSONSchemaExtension } from "@sroussey/json-schema-to-ts"; -import { JsonSchema, JsonSchemaCustomProps } from "./JsonSchema"; +import type { JsonSchema, JsonSchemaCustomProps } from "./JsonSchema"; export type DataPortSchemaNonBoolean< EXTENSION extends JSONSchemaExtension = JsonSchemaCustomProps, diff --git a/packages/util/src/media/imageValueSchema.ts b/packages/util/src/media/imageValueSchema.ts index 9eea9fb94..08f3a7ce4 100644 --- a/packages/util/src/media/imageValueSchema.ts +++ b/packages/util/src/media/imageValueSchema.ts @@ -4,7 +4,7 @@ * All Rights Reserved */ -import { PropertySchema } from "../schema-entry"; +import type { PropertySchema } from "../schema-entry"; import type { ImageValue } from "./imageValue"; export type WithImageValuePorts< diff --git a/packages/util/src/telemetry/NoopTelemetryProvider.ts b/packages/util/src/telemetry/NoopTelemetryProvider.ts index 23b4a9a8e..5be70d7bf 100644 --- a/packages/util/src/telemetry/NoopTelemetryProvider.ts +++ b/packages/util/src/telemetry/NoopTelemetryProvider.ts @@ -4,8 +4,13 @@ * SPDX-License-Identifier: Apache-2.0 */ -import type { ISpan, ITelemetryProvider, SpanAttributes, SpanOptions } from "./ITelemetryProvider"; -import { SpanStatusCode } from "./ITelemetryProvider"; +import type { + ISpan, + ITelemetryProvider, + SpanAttributes, + SpanOptions, + SpanStatusCode, +} from "./ITelemetryProvider"; /** * A no-op span that does nothing. Used when telemetry is disabled. diff --git a/packages/util/src/telemetry/TelemetryRegistry.ts b/packages/util/src/telemetry/TelemetryRegistry.ts index 9a3ca6cc3..c3f692c44 100644 --- a/packages/util/src/telemetry/TelemetryRegistry.ts +++ b/packages/util/src/telemetry/TelemetryRegistry.ts @@ -4,7 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { createServiceToken, globalServiceRegistry, ServiceRegistry } from "../di/ServiceRegistry"; +import type { ServiceRegistry } from "../di/ServiceRegistry"; +import { createServiceToken, globalServiceRegistry } from "../di/ServiceRegistry"; import { readRuntimeEnv } from "../utilities/runtimeEnv"; import { ConsoleTelemetryProvider } from "./ConsoleTelemetryProvider"; import type { ITelemetryProvider } from "./ITelemetryProvider"; diff --git a/packages/util/src/vector/Tensor.ts b/packages/util/src/vector/Tensor.ts index 34897fa78..5a971931e 100644 --- a/packages/util/src/vector/Tensor.ts +++ b/packages/util/src/vector/Tensor.ts @@ -4,9 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { FromSchema } from "../json-schema/FromSchema"; -import { JsonSchema } from "../json-schema/JsonSchema"; -import { TypedArraySchema, TypedArraySchemaOptions } from "./TypedArray"; +import type { FromSchema } from "../json-schema/FromSchema"; +import type { JsonSchema } from "../json-schema/JsonSchema"; +import type { TypedArraySchemaOptions } from "./TypedArray"; +import { TypedArraySchema } from "./TypedArray"; export const TensorType = { FLOAT16: "float16", diff --git a/packages/util/src/vector/TypedArray.ts b/packages/util/src/vector/TypedArray.ts index ebd39111d..755f0d10f 100644 --- a/packages/util/src/vector/TypedArray.ts +++ b/packages/util/src/vector/TypedArray.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { FromSchema, FromSchemaDefaultOptions, FromSchemaOptions } from "../json-schema/FromSchema"; -import { JsonSchema } from "../json-schema/JsonSchema"; +import type { FromSchema, FromSchemaOptions } from "../json-schema/FromSchema"; +import { FromSchemaDefaultOptions } from "../json-schema/FromSchema"; +import type { JsonSchema } from "../json-schema/JsonSchema"; /** * Polyfill Float16Array for runtimes that don't support it yet (Node < 24). diff --git a/providers/anthropic/src/ai/common/Anthropic_ModelSchema.ts b/providers/anthropic/src/ai/common/Anthropic_ModelSchema.ts index 14e2eede3..d82d85d37 100644 --- a/providers/anthropic/src/ai/common/Anthropic_ModelSchema.ts +++ b/providers/anthropic/src/ai/common/Anthropic_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { ANTHROPIC, ANTHROPIC_DEFAULT_MAX_TOKENS } from "./Anthropic_Constants"; export const AnthropicModelSchema = { diff --git a/providers/cactus/src/ai/common/Cactus_ModelSchema.ts b/providers/cactus/src/ai/common/Cactus_ModelSchema.ts index 796429058..a107638a4 100644 --- a/providers/cactus/src/ai/common/Cactus_ModelSchema.ts +++ b/providers/cactus/src/ai/common/Cactus_ModelSchema.ts @@ -5,8 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import type { DataPortSchemaObject } from "@workglow/util/schema"; -import { FromSchema } from "@workglow/util/schema"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/schema"; import { CACTUS_DEFAULT_MODELS_DIR, CACTUS_NEEDLE_26M, LOCAL_CACTUS } from "./Cactus_Constants"; export const CactusModelSchema = { diff --git a/providers/chrome-ai/src/ai/common/WebBrowser_ModelSchema.ts b/providers/chrome-ai/src/ai/common/WebBrowser_ModelSchema.ts index f5db9f325..a32247e4d 100644 --- a/providers/chrome-ai/src/ai/common/WebBrowser_ModelSchema.ts +++ b/providers/chrome-ai/src/ai/common/WebBrowser_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { WEB_BROWSER } from "./WebBrowser_Constants"; export const WebBrowserModelSchema = { diff --git a/providers/deepseek/src/ai/common/DeepSeek_ModelSchema.ts b/providers/deepseek/src/ai/common/DeepSeek_ModelSchema.ts index 662c2c5b5..73a5abe5a 100644 --- a/providers/deepseek/src/ai/common/DeepSeek_ModelSchema.ts +++ b/providers/deepseek/src/ai/common/DeepSeek_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { DEEPSEEK } from "./DeepSeek_Constants"; export const DeepSeekModelSchema = { diff --git a/providers/duckdb/src/storage/DuckDbTabularStorage.ts b/providers/duckdb/src/storage/DuckDbTabularStorage.ts index 602ae8dac..d11a6b874 100644 --- a/providers/duckdb/src/storage/DuckDbTabularStorage.ts +++ b/providers/duckdb/src/storage/DuckDbTabularStorage.ts @@ -6,38 +6,40 @@ import type { DuckDbDatabase } from "@workglow/duckdb/storage"; import { DuckDb } from "@workglow/duckdb/storage"; -import { +import type { AnyTabularStorage, AutoGeneratedKeys, - BaseSqlTabularStorage, - buildSearchWhere, BulkPutDialect, ClientProvidedKeysOption, CoveringIndexQueryOptions, DeleteSearchCriteria, - DuckDbDialect, InsertEntity, ITabularMigration, ITabularMigrationApplier, KeyGenerationStrategy, - MIGRATIONS_TABLE, Page, PageRequest, - pickCoveringIndex, QueryOptions, - runInTransactionOnConnection, - runOnConnection, - safeEmit, SearchCriteria, SimplifyPrimaryKey, - SqlTabularMigrationApplier, TabularChangePayload, TabularSubscribeOptions, - TYPED_ARRAY_CTORS, ValueOptionType, } from "@workglow/storage"; -import { createServiceToken, uuid4 } from "@workglow/util"; import { + BaseSqlTabularStorage, + buildSearchWhere, + DuckDbDialect, + MIGRATIONS_TABLE, + pickCoveringIndex, + runInTransactionOnConnection, + runOnConnection, + safeEmit, + SqlTabularMigrationApplier, + TYPED_ARRAY_CTORS, +} from "@workglow/storage"; +import { createServiceToken, uuid4 } from "@workglow/util"; +import type { DataPortSchemaObject, FromSchema, JsonSchema, diff --git a/providers/google-gemini/src/ai/common/Gemini_ModelSchema.ts b/providers/google-gemini/src/ai/common/Gemini_ModelSchema.ts index 9c0fd52d9..f37f53a19 100644 --- a/providers/google-gemini/src/ai/common/Gemini_ModelSchema.ts +++ b/providers/google-gemini/src/ai/common/Gemini_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { GOOGLE_GEMINI } from "./Gemini_Constants"; export const GeminiModelSchema = { diff --git a/providers/huggingface-inference/src/ai/common/HFI_ModelSchema.ts b/providers/huggingface-inference/src/ai/common/HFI_ModelSchema.ts index c17fbe5b1..01ea732f3 100644 --- a/providers/huggingface-inference/src/ai/common/HFI_ModelSchema.ts +++ b/providers/huggingface-inference/src/ai/common/HFI_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { HF_INFERENCE } from "./HFI_Constants"; export const HfInferenceModelSchema = { diff --git a/providers/huggingface-transformers/src/ai/common/HFT_ImageEmbedding.ts b/providers/huggingface-transformers/src/ai/common/HFT_ImageEmbedding.ts index cd639eb48..31e5c4065 100644 --- a/providers/huggingface-transformers/src/ai/common/HFT_ImageEmbedding.ts +++ b/providers/huggingface-transformers/src/ai/common/HFT_ImageEmbedding.ts @@ -11,7 +11,8 @@ import type { ImageEmbeddingTaskOutput, } from "@workglow/ai"; import { imageValueToBlob } from "@workglow/ai/provider-utils"; -import { getLogger, TypedArray } from "@workglow/util/worker"; +import type { TypedArray } from "@workglow/util/worker"; +import { getLogger } from "@workglow/util/worker"; import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema"; import { getPipeline, getPipelineCacheKey, withHftPipelineInUse } from "./HFT_Pipeline"; diff --git a/providers/huggingface-transformers/src/ai/common/HFT_ModelSchema.ts b/providers/huggingface-transformers/src/ai/common/HFT_ModelSchema.ts index b2a6d885b..5085ec4bb 100644 --- a/providers/huggingface-transformers/src/ai/common/HFT_ModelSchema.ts +++ b/providers/huggingface-transformers/src/ai/common/HFT_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { HF_TRANSFORMERS_ONNX, PipelineUseCase, QuantizationDataType } from "./HFT_Constants"; export const HfTransformersOnnxModelSchema = { diff --git a/providers/huggingface-transformers/src/ai/common/HFT_TextEmbedding.ts b/providers/huggingface-transformers/src/ai/common/HFT_TextEmbedding.ts index 8b6069fac..c27a0516c 100644 --- a/providers/huggingface-transformers/src/ai/common/HFT_TextEmbedding.ts +++ b/providers/huggingface-transformers/src/ai/common/HFT_TextEmbedding.ts @@ -10,7 +10,8 @@ import type { TextEmbeddingTaskInput, TextEmbeddingTaskOutput, } from "@workglow/ai"; -import { getLogger, TypedArray } from "@workglow/util/worker"; +import type { TypedArray } from "@workglow/util/worker"; +import { getLogger } from "@workglow/util/worker"; import type { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema"; import { getPipeline, getPipelineCacheKey, withHftPipelineInUse } from "./HFT_Pipeline"; diff --git a/providers/node-llama-cpp/src/ai/common/LlamaCpp_ModelSchema.ts b/providers/node-llama-cpp/src/ai/common/LlamaCpp_ModelSchema.ts index 87033c8fc..b1a4e6903 100644 --- a/providers/node-llama-cpp/src/ai/common/LlamaCpp_ModelSchema.ts +++ b/providers/node-llama-cpp/src/ai/common/LlamaCpp_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { LLAMACPP_DEFAULT_MODELS_DIR, LOCAL_LLAMACPP } from "./LlamaCpp_Constants"; export const LlamaCppModelSchema = { diff --git a/providers/ollama/src/ai/common/Ollama_ModelSchema.ts b/providers/ollama/src/ai/common/Ollama_ModelSchema.ts index c9a70d7db..29a58c099 100644 --- a/providers/ollama/src/ai/common/Ollama_ModelSchema.ts +++ b/providers/ollama/src/ai/common/Ollama_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { OLLAMA, OLLAMA_DEFAULT_BASE_URL } from "./Ollama_Constants"; export const OllamaModelSchema = { diff --git a/providers/openai/src/ai/common/OpenAI_ModelSchema.ts b/providers/openai/src/ai/common/OpenAI_ModelSchema.ts index e1ddd8aa9..0e0577262 100644 --- a/providers/openai/src/ai/common/OpenAI_ModelSchema.ts +++ b/providers/openai/src/ai/common/OpenAI_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { OPENAI } from "./OpenAI_Constants"; export const OpenAiModelSchema = { diff --git a/providers/openrouter/src/ai/common/OpenRouter_ModelSchema.ts b/providers/openrouter/src/ai/common/OpenRouter_ModelSchema.ts index cfa69afb1..a6f04e0e9 100644 --- a/providers/openrouter/src/ai/common/OpenRouter_ModelSchema.ts +++ b/providers/openrouter/src/ai/common/OpenRouter_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { OPENROUTER } from "./OpenRouter_Constants"; export const OpenRouterModelSchema = { diff --git a/providers/postgres/src/storage/PostgresKvStorage.ts b/providers/postgres/src/storage/PostgresKvStorage.ts index de6d266e5..69228bb21 100644 --- a/providers/postgres/src/storage/PostgresKvStorage.ts +++ b/providers/postgres/src/storage/PostgresKvStorage.ts @@ -4,14 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - DefaultKeyValueKey, - DefaultKeyValueSchema, - IKvStorage, - KvViaTabularStorage, -} from "@workglow/storage"; +import type { IKvStorage } from "@workglow/storage"; +import { DefaultKeyValueKey, DefaultKeyValueSchema, KvViaTabularStorage } from "@workglow/storage"; import { createServiceToken } from "@workglow/util"; -import { JsonSchema } from "@workglow/util/schema"; +import type { JsonSchema } from "@workglow/util/schema"; import { PostgresTabularStorage } from "./PostgresTabularStorage"; export const POSTGRES_KV_REPOSITORY = createServiceToken>( diff --git a/providers/postgres/src/storage/PostgresTabularStorage.ts b/providers/postgres/src/storage/PostgresTabularStorage.ts index ee8906a02..e72de6152 100644 --- a/providers/postgres/src/storage/PostgresTabularStorage.ts +++ b/providers/postgres/src/storage/PostgresTabularStorage.ts @@ -5,11 +5,9 @@ */ import type { Pool } from "@workglow/postgres/storage"; -import { +import type { AnyTabularStorage, AutoGeneratedKeys, - BaseSqlTabularStorage, - buildSearchWhere, BulkPutDialect, ClientProvidedKeysOption, CoveringIndexQueryOptions, @@ -17,31 +15,35 @@ import { InsertEntity, ITabularMigration, ITabularMigrationApplier, - mapPostgresType, - MIGRATIONS_TABLE, Page, PageRequest, + QueryOptions, + SearchCriteria, + SimplifyPrimaryKey, + TabularChangePayload, + TabularSubscribeOptions, + ValueOptionType, +} from "@workglow/storage"; +import { + BaseSqlTabularStorage, + buildSearchWhere, + mapPostgresType, + MIGRATIONS_TABLE, pickCoveringIndex, PostgresDialect, - QueryOptions, runInTransactionOnConnection, runOnConnection, safeEmit, - SearchCriteria, - SimplifyPrimaryKey, SqlTabularMigrationApplier, - TabularChangePayload, - TabularSubscribeOptions, TYPED_ARRAY_CTORS, - ValueOptionType, type VectorIndexOptions, } from "@workglow/storage"; import { createServiceToken } from "@workglow/util"; -import type { TypedArray } from "@workglow/util/schema"; -import { +import type { DataPortSchemaObject, FromSchema, JsonSchema, + TypedArray, TypedArraySchemaOptions, } from "@workglow/util/schema"; diff --git a/providers/sqlite/src/storage/SqliteAiVectorStorage.ts b/providers/sqlite/src/storage/SqliteAiVectorStorage.ts index a69153a90..290fcec48 100644 --- a/providers/sqlite/src/storage/SqliteAiVectorStorage.ts +++ b/providers/sqlite/src/storage/SqliteAiVectorStorage.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Sqlite } from "@workglow/sqlite/storage"; +import type { Sqlite } from "@workglow/sqlite/storage"; import type { IVectorStorage, VectorDistanceMetric, diff --git a/providers/sqlite/src/storage/SqliteKvStorage.ts b/providers/sqlite/src/storage/SqliteKvStorage.ts index 9b00562e6..0f1aee13f 100644 --- a/providers/sqlite/src/storage/SqliteKvStorage.ts +++ b/providers/sqlite/src/storage/SqliteKvStorage.ts @@ -4,14 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - DefaultKeyValueKey, - DefaultKeyValueSchema, - IKvStorage, - KvViaTabularStorage, -} from "@workglow/storage"; +import type { IKvStorage } from "@workglow/storage"; +import { DefaultKeyValueKey, DefaultKeyValueSchema, KvViaTabularStorage } from "@workglow/storage"; import { createServiceToken } from "@workglow/util"; -import { JsonSchema } from "@workglow/util/schema"; +import type { JsonSchema } from "@workglow/util/schema"; import { SqliteTabularStorage } from "./SqliteTabularStorage"; export const SQLITE_KV_REPOSITORY = createServiceToken>( diff --git a/providers/sqlite/src/storage/SqliteTabularStorage.ts b/providers/sqlite/src/storage/SqliteTabularStorage.ts index e923a7a82..81fc3008f 100644 --- a/providers/sqlite/src/storage/SqliteTabularStorage.ts +++ b/providers/sqlite/src/storage/SqliteTabularStorage.ts @@ -5,11 +5,9 @@ */ import { Sqlite } from "@workglow/sqlite/storage"; -import { +import type { AnyTabularStorage, AutoGeneratedKeys, - BaseSqlTabularStorage, - buildSearchWhere, BulkPutDialect, ClientProvidedKeysOption, CoveringIndexQueryOptions, @@ -18,25 +16,29 @@ import { ITabularMigration, ITabularMigrationApplier, KeyGenerationStrategy, - MIGRATIONS_TABLE, Page, PageRequest, - pickCoveringIndex, QueryOptions, + SearchCriteria, + SimplifyPrimaryKey, + TabularChangePayload, + TabularSubscribeOptions, + ValueOptionType, +} from "@workglow/storage"; +import { + BaseSqlTabularStorage, + buildSearchWhere, + MIGRATIONS_TABLE, + pickCoveringIndex, runInTransactionOnConnection, runOnConnection, safeEmit, - SearchCriteria, - SimplifyPrimaryKey, SqliteDialect, SqlTabularMigrationApplier, - TabularChangePayload, - TabularSubscribeOptions, TYPED_ARRAY_CTORS, - ValueOptionType, } from "@workglow/storage"; import { createServiceToken, uuid4 } from "@workglow/util"; -import { +import type { DataPortSchemaObject, FromSchema, JsonSchema, diff --git a/providers/sqlite/src/storage/SqliteVectorStorage.ts b/providers/sqlite/src/storage/SqliteVectorStorage.ts index 820fc3c89..0c05f27dd 100644 --- a/providers/sqlite/src/storage/SqliteVectorStorage.ts +++ b/providers/sqlite/src/storage/SqliteVectorStorage.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Sqlite } from "@workglow/sqlite/storage"; +import type { Sqlite } from "@workglow/sqlite/storage"; import type { AutoGeneratedKeys, InsertEntity, diff --git a/providers/supabase/src/job-queue/SupabaseRateLimiterStorage.ts b/providers/supabase/src/job-queue/SupabaseRateLimiterStorage.ts index 82bdf4255..950f84cff 100644 --- a/providers/supabase/src/job-queue/SupabaseRateLimiterStorage.ts +++ b/providers/supabase/src/job-queue/SupabaseRateLimiterStorage.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { SupabaseClient } from "@supabase/supabase-js"; +import type { SupabaseClient } from "@supabase/supabase-js"; import type { IRateLimiterStorage, PrefixColumn, diff --git a/providers/supabase/src/storage/SupabaseKvStorage.ts b/providers/supabase/src/storage/SupabaseKvStorage.ts index 56c4d9d5d..c6a411efe 100644 --- a/providers/supabase/src/storage/SupabaseKvStorage.ts +++ b/providers/supabase/src/storage/SupabaseKvStorage.ts @@ -4,14 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - DefaultKeyValueKey, - DefaultKeyValueSchema, - IKvStorage, - KvViaTabularStorage, -} from "@workglow/storage"; +import type { IKvStorage } from "@workglow/storage"; +import { DefaultKeyValueKey, DefaultKeyValueSchema, KvViaTabularStorage } from "@workglow/storage"; import { createServiceToken } from "@workglow/util"; -import { JsonSchema } from "@workglow/util/schema"; +import type { JsonSchema } from "@workglow/util/schema"; import { SupabaseTabularStorage } from "./SupabaseTabularStorage"; export const SUPABASE_KV_REPOSITORY = createServiceToken>( diff --git a/providers/supabase/src/storage/SupabaseTabularStorage.ts b/providers/supabase/src/storage/SupabaseTabularStorage.ts index 21a7c773c..daca26781 100644 --- a/providers/supabase/src/storage/SupabaseTabularStorage.ts +++ b/providers/supabase/src/storage/SupabaseTabularStorage.ts @@ -5,34 +5,36 @@ */ import type { RealtimeChannel, SupabaseClient } from "@supabase/supabase-js"; -import { +import type { AnyTabularStorage, - assertCursorMatches, AutoGeneratedKeys, - BaseSqlTabularStorage, ClientProvidedKeysOption, CoveringIndexQueryOptions, - decodeCursor, DeleteSearchCriteria, InsertEntity, - mapPostgresType, - normalizeCriterion, Page, PageRequest, - pickCoveringIndex, - pkFingerprint, QueryOptions, - safeEmit, SearchCriteria, SimplifyPrimaryKey, - StorageValidationError, TabularChangePayload, TabularChangeType, TabularSubscribeOptions, ValueOptionType, } from "@workglow/storage"; -import { createServiceToken, uuid4 } from "@workglow/util"; import { + assertCursorMatches, + BaseSqlTabularStorage, + decodeCursor, + mapPostgresType, + normalizeCriterion, + pickCoveringIndex, + pkFingerprint, + safeEmit, + StorageValidationError, +} from "@workglow/storage"; +import { createServiceToken, uuid4 } from "@workglow/util"; +import type { DataPortSchemaObject, FromSchema, JsonSchema, diff --git a/providers/supabase/src/storage/SupabaseVectorStorage.ts b/providers/supabase/src/storage/SupabaseVectorStorage.ts index a0cca5e8b..1dfb2841a 100644 --- a/providers/supabase/src/storage/SupabaseVectorStorage.ts +++ b/providers/supabase/src/storage/SupabaseVectorStorage.ts @@ -5,10 +5,14 @@ */ import type { SupabaseClient } from "@supabase/supabase-js"; -import type { InsertEntity, IVectorStorage, VectorSearchOptions } from "@workglow/storage"; +import type { + AutoGeneratedKeys, + InsertEntity, + IVectorStorage, + VectorSearchOptions, +} from "@workglow/storage"; import { assertVectorShape, - AutoGeneratedKeys, emitSimilaritySearch, getMetadataProperty, getVectorProperty, diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_Download.ts b/providers/tf-mediapipe/src/ai/common/TFMP_Download.ts index 2459adb04..7bda467db 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_Download.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_Download.ts @@ -12,7 +12,7 @@ import type { import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksTextSDK, loadTfmpTasksVisionSDK } from "./TFMP_Client"; import { closeGenaiLlm, getGenaiLlm, withGenaiLock } from "./TFMP_GenaiRuntime"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import type { TaskInstance } from "./TFMP_Runtime"; import { getModelTask, modelTaskCache, wasm_reference_counts, wasm_tasks } from "./TFMP_Runtime"; diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_FaceDetector.ts b/providers/tf-mediapipe/src/ai/common/TFMP_FaceDetector.ts index adb64bf77..468edfb4a 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_FaceDetector.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_FaceDetector.ts @@ -7,7 +7,7 @@ import type { AiProviderRunFn, FaceDetectorTaskInput, FaceDetectorTaskOutput } from "@workglow/ai"; import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksVisionSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_FaceDetector: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_FaceLandmarker.ts b/providers/tf-mediapipe/src/ai/common/TFMP_FaceLandmarker.ts index 1b3a9d804..e20a2e8ad 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_FaceLandmarker.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_FaceLandmarker.ts @@ -11,7 +11,7 @@ import type { } from "@workglow/ai"; import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksVisionSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_FaceLandmarker: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_GestureRecognizer.ts b/providers/tf-mediapipe/src/ai/common/TFMP_GestureRecognizer.ts index ca1d2d2fb..63b7e66f7 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_GestureRecognizer.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_GestureRecognizer.ts @@ -11,7 +11,7 @@ import type { } from "@workglow/ai"; import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksVisionSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_GestureRecognizer: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_HandLandmarker.ts b/providers/tf-mediapipe/src/ai/common/TFMP_HandLandmarker.ts index 0d2082c62..5d1053d45 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_HandLandmarker.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_HandLandmarker.ts @@ -11,7 +11,7 @@ import type { } from "@workglow/ai"; import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksVisionSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_HandLandmarker: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_ImageClassification.ts b/providers/tf-mediapipe/src/ai/common/TFMP_ImageClassification.ts index 4b429bbb1..1920f924b 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_ImageClassification.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_ImageClassification.ts @@ -11,7 +11,7 @@ import type { } from "@workglow/ai"; import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksVisionSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_ImageClassification: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_ImageEmbedding.ts b/providers/tf-mediapipe/src/ai/common/TFMP_ImageEmbedding.ts index 89fe6fb08..45800c6e5 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_ImageEmbedding.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_ImageEmbedding.ts @@ -11,7 +11,7 @@ import type { } from "@workglow/ai"; import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksVisionSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_ImageEmbedding: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_ImageSegmentation.ts b/providers/tf-mediapipe/src/ai/common/TFMP_ImageSegmentation.ts index fcebce763..8f6518671 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_ImageSegmentation.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_ImageSegmentation.ts @@ -12,7 +12,7 @@ import type { import { PermanentJobError } from "@workglow/job-queue"; import { imageValueFromBitmap } from "@workglow/util/media"; import { loadTfmpTasksVisionSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_ImageSegmentation: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_ModelInfo.ts b/providers/tf-mediapipe/src/ai/common/TFMP_ModelInfo.ts index 0525c31cd..04e2caf09 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_ModelInfo.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_ModelInfo.ts @@ -5,7 +5,7 @@ */ import type { AiProviderRunFn, ModelInfoTaskInput, ModelInfoTaskOutput } from "@workglow/ai"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { modelTaskCache } from "./TFMP_Runtime"; /** Known MediaPipe embedding model dimensions. */ diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_ModelSchema.ts b/providers/tf-mediapipe/src/ai/common/TFMP_ModelSchema.ts index ccf915b7a..bcfadf87f 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_ModelSchema.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { TENSORFLOW_MEDIAPIPE, TextPipelineTask } from "../common/TFMP_Constants"; export const TFMPModelSchema = { diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_ObjectDetection.ts b/providers/tf-mediapipe/src/ai/common/TFMP_ObjectDetection.ts index 3da5682b1..3835ca327 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_ObjectDetection.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_ObjectDetection.ts @@ -11,7 +11,7 @@ import type { } from "@workglow/ai"; import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksVisionSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_ObjectDetection: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_PoseLandmarker.ts b/providers/tf-mediapipe/src/ai/common/TFMP_PoseLandmarker.ts index 82fcaf2f2..46e1daa76 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_PoseLandmarker.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_PoseLandmarker.ts @@ -11,7 +11,7 @@ import type { } from "@workglow/ai"; import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksVisionSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_PoseLandmarker: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_Runtime.ts b/providers/tf-mediapipe/src/ai/common/TFMP_Runtime.ts index ca831051c..f26c019a8 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_Runtime.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_Runtime.ts @@ -14,7 +14,7 @@ import { } from "./TFMP_Client"; import type { TfmpDelegate } from "./TFMP_Delegate"; import { resolveTfmpDelegate } from "./TFMP_Delegate"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; export interface TFMPWasmFileset { readonly wasmLoaderPath: string; diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_TextClassification.ts b/providers/tf-mediapipe/src/ai/common/TFMP_TextClassification.ts index 47d6f553f..adb2708c3 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_TextClassification.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_TextClassification.ts @@ -11,7 +11,7 @@ import type { } from "@workglow/ai"; import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksTextSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_TextClassification: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_TextEmbedding.ts b/providers/tf-mediapipe/src/ai/common/TFMP_TextEmbedding.ts index 4ab066765..f6496cd37 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_TextEmbedding.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_TextEmbedding.ts @@ -11,7 +11,7 @@ import type { } from "@workglow/ai"; import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksTextSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_TextEmbedding: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_TextLanguageDetection.ts b/providers/tf-mediapipe/src/ai/common/TFMP_TextLanguageDetection.ts index 95acc3da6..f3cd459ce 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_TextLanguageDetection.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_TextLanguageDetection.ts @@ -11,7 +11,7 @@ import type { } from "@workglow/ai"; import { PermanentJobError } from "@workglow/job-queue"; import { loadTfmpTasksTextSDK } from "./TFMP_Client"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { getModelTask } from "./TFMP_Runtime"; export const TFMP_TextLanguageDetection: AiProviderRunFn< diff --git a/providers/tf-mediapipe/src/ai/common/TFMP_Unload.ts b/providers/tf-mediapipe/src/ai/common/TFMP_Unload.ts index 9794c0200..646f7c2d1 100644 --- a/providers/tf-mediapipe/src/ai/common/TFMP_Unload.ts +++ b/providers/tf-mediapipe/src/ai/common/TFMP_Unload.ts @@ -10,7 +10,7 @@ import type { ModelDownloadRemoveTaskRunOutput, } from "@workglow/ai"; import { closeGenaiLlm } from "./TFMP_GenaiRuntime"; -import { TFMPModelConfig } from "./TFMP_ModelSchema"; +import type { TFMPModelConfig } from "./TFMP_ModelSchema"; import { modelTaskCache, wasm_reference_counts, wasm_tasks } from "./TFMP_Runtime"; export const TFMP_Unload: AiProviderRunFn< diff --git a/providers/xai/src/ai/common/Xai_ModelSchema.ts b/providers/xai/src/ai/common/Xai_ModelSchema.ts index 20129ad28..101575d97 100644 --- a/providers/xai/src/ai/common/Xai_ModelSchema.ts +++ b/providers/xai/src/ai/common/Xai_ModelSchema.ts @@ -5,7 +5,7 @@ */ import { ModelConfigSchema, ModelRecordSchema } from "@workglow/ai/worker"; -import { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; +import type { DataPortSchemaObject, FromSchema } from "@workglow/util/worker"; import { XAI } from "./Xai_Constants"; export const XaiModelSchema = {