ibm-watsonx-orchestrate 1.6.2__py3-none-any.whl → 1.6.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. ibm_watsonx_orchestrate/__init__.py +2 -1
  2. ibm_watsonx_orchestrate/agent_builder/agents/agent.py +3 -3
  3. ibm_watsonx_orchestrate/agent_builder/agents/assistant_agent.py +3 -2
  4. ibm_watsonx_orchestrate/agent_builder/agents/external_agent.py +3 -2
  5. ibm_watsonx_orchestrate/agent_builder/agents/types.py +38 -9
  6. ibm_watsonx_orchestrate/agent_builder/connections/connections.py +4 -3
  7. ibm_watsonx_orchestrate/agent_builder/connections/types.py +14 -2
  8. ibm_watsonx_orchestrate/agent_builder/knowledge_bases/knowledge_base_requests.py +1 -22
  9. ibm_watsonx_orchestrate/agent_builder/knowledge_bases/types.py +1 -17
  10. ibm_watsonx_orchestrate/agent_builder/tools/base_tool.py +2 -1
  11. ibm_watsonx_orchestrate/agent_builder/tools/openapi_tool.py +75 -24
  12. ibm_watsonx_orchestrate/agent_builder/tools/python_tool.py +136 -92
  13. ibm_watsonx_orchestrate/agent_builder/tools/types.py +17 -11
  14. ibm_watsonx_orchestrate/cli/commands/agents/agents_command.py +7 -7
  15. ibm_watsonx_orchestrate/cli/commands/agents/agents_controller.py +7 -6
  16. ibm_watsonx_orchestrate/cli/commands/channels/types.py +15 -2
  17. ibm_watsonx_orchestrate/cli/commands/channels/webchat/channels_webchat_controller.py +35 -25
  18. ibm_watsonx_orchestrate/cli/commands/connections/connections_command.py +14 -6
  19. ibm_watsonx_orchestrate/cli/commands/connections/connections_controller.py +6 -8
  20. ibm_watsonx_orchestrate/cli/commands/copilot/copilot_command.py +65 -0
  21. ibm_watsonx_orchestrate/cli/commands/copilot/copilot_controller.py +368 -0
  22. ibm_watsonx_orchestrate/cli/commands/copilot/copilot_server_controller.py +170 -0
  23. ibm_watsonx_orchestrate/cli/commands/environment/environment_controller.py +5 -5
  24. ibm_watsonx_orchestrate/cli/commands/environment/types.py +3 -1
  25. ibm_watsonx_orchestrate/cli/commands/evaluations/evaluations_command.py +102 -37
  26. ibm_watsonx_orchestrate/cli/commands/evaluations/evaluations_controller.py +20 -2
  27. ibm_watsonx_orchestrate/cli/commands/knowledge_bases/knowledge_bases_command.py +0 -18
  28. ibm_watsonx_orchestrate/cli/commands/knowledge_bases/knowledge_bases_controller.py +36 -20
  29. ibm_watsonx_orchestrate/cli/commands/models/models_command.py +1 -1
  30. ibm_watsonx_orchestrate/cli/commands/models/models_controller.py +5 -8
  31. ibm_watsonx_orchestrate/cli/commands/server/server_command.py +94 -36
  32. ibm_watsonx_orchestrate/cli/commands/toolkit/toolkit_command.py +1 -1
  33. ibm_watsonx_orchestrate/cli/commands/tools/tools_controller.py +11 -4
  34. ibm_watsonx_orchestrate/cli/config.py +3 -3
  35. ibm_watsonx_orchestrate/cli/init_helper.py +10 -1
  36. ibm_watsonx_orchestrate/cli/main.py +5 -0
  37. ibm_watsonx_orchestrate/client/base_api_client.py +12 -0
  38. ibm_watsonx_orchestrate/client/connections/connections_client.py +5 -30
  39. ibm_watsonx_orchestrate/client/copilot/cpe/copilot_cpe_client.py +67 -0
  40. ibm_watsonx_orchestrate/client/knowledge_bases/knowledge_base_client.py +1 -1
  41. ibm_watsonx_orchestrate/client/local_service_instance.py +3 -1
  42. ibm_watsonx_orchestrate/client/service_instance.py +33 -7
  43. ibm_watsonx_orchestrate/client/utils.py +49 -8
  44. ibm_watsonx_orchestrate/docker/compose-lite.yml +198 -6
  45. ibm_watsonx_orchestrate/docker/default.env +36 -12
  46. ibm_watsonx_orchestrate/flow_builder/flows/__init__.py +9 -4
  47. ibm_watsonx_orchestrate/flow_builder/flows/decorators.py +4 -2
  48. ibm_watsonx_orchestrate/flow_builder/flows/events.py +10 -9
  49. ibm_watsonx_orchestrate/flow_builder/flows/flow.py +131 -20
  50. ibm_watsonx_orchestrate/flow_builder/node.py +18 -1
  51. ibm_watsonx_orchestrate/flow_builder/types.py +271 -16
  52. ibm_watsonx_orchestrate/flow_builder/utils.py +120 -6
  53. ibm_watsonx_orchestrate/utils/exceptions.py +23 -0
  54. {ibm_watsonx_orchestrate-1.6.2.dist-info → ibm_watsonx_orchestrate-1.6.4.dist-info}/METADATA +3 -7
  55. {ibm_watsonx_orchestrate-1.6.2.dist-info → ibm_watsonx_orchestrate-1.6.4.dist-info}/RECORD +58 -55
  56. ibm_watsonx_orchestrate/agent_builder/utils/pydantic_utils.py +0 -149
  57. ibm_watsonx_orchestrate/flow_builder/resources/flow_status.openapi.yml +0 -66
  58. {ibm_watsonx_orchestrate-1.6.2.dist-info → ibm_watsonx_orchestrate-1.6.4.dist-info}/WHEEL +0 -0
  59. {ibm_watsonx_orchestrate-1.6.2.dist-info → ibm_watsonx_orchestrate-1.6.4.dist-info}/entry_points.txt +0 -0
  60. {ibm_watsonx_orchestrate-1.6.2.dist-info → ibm_watsonx_orchestrate-1.6.4.dist-info}/licenses/LICENSE +0 -0
@@ -6,6 +6,7 @@
6
6
  from __future__ import annotations
7
7
 
8
8
  from ibm_cloud_sdk_core.authenticators import MCSPAuthenticator
9
+ from ibm_cloud_sdk_core.authenticators import MCSPV2Authenticator
9
10
  from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
10
11
  from ibm_cloud_sdk_core.authenticators import CloudPakForDataAuthenticator
11
12
 
@@ -51,24 +52,47 @@ class ServiceInstance(BaseServiceInstance):
51
52
  def _create_token(self) -> str:
52
53
  if not self._credentials.auth_type:
53
54
  if ".cloud.ibm.com" in self._credentials.url:
54
- logger.warning("Using IBM IAM Auth Type. If this is incorrect please use the '--type' flag to explicitly choose one of 'ibm_iam' or 'mcsp' or 'cpd")
55
+ logger.warning("Using IBM IAM Auth Type. If this is incorrect please use the '--type' flag to explicitly choose one of 'mcsp', 'mcsp_v1', 'mcsp_v2' or 'cpd' ")
55
56
  return self._authenticate(EnvironmentAuthType.IBM_CLOUD_IAM)
56
57
  elif is_cpd_env(self._credentials.url):
57
- logger.warning("Using CPD Auth Type. If this is incorrect please use the '--type' flag to explicitly choose one of 'ibm_iam' or 'mcsp' or 'cpd")
58
+ logger.warning("Using CPD Auth Type. If this is incorrect please use the '--type' flag to explicitly choose one of 'ibm_iam', 'mcsp', 'mcsp_v1' or 'mcsp_v2' ")
58
59
  return self._authenticate(EnvironmentAuthType.CPD)
59
60
  else:
60
- logger.warning("Using MCSP Auth Type. If this is incorrect please use the '--type' flag to explicitly choose one of 'ibm_iam' or 'mcsp' or 'cpd' ")
61
- return self._authenticate(EnvironmentAuthType.MCSP)
61
+ logger.warning("Using MCSP Auth Type. If this is incorrect please use the '--type' flag to explicitly choose one of 'ibm_iam', 'mcsp_v1', 'mcsp_v2' or 'cpd' ")
62
+ try:
63
+ return self._authenticate(EnvironmentAuthType.MCSP_V1)
64
+ except:
65
+ return self._authenticate(EnvironmentAuthType.MCSP_V2)
66
+ auth_type = self._credentials.auth_type.lower()
67
+ if auth_type == "mcsp":
68
+ try:
69
+ return self._authenticate(EnvironmentAuthType.MCSP_V1)
70
+ except:
71
+ return self._authenticate(EnvironmentAuthType.MCSP_V2)
72
+ elif auth_type == "mcsp_v1":
73
+ return self._authenticate(EnvironmentAuthType.MCSP_V1)
74
+ elif auth_type == "mcsp_v2":
75
+ return self._authenticate(EnvironmentAuthType.MCSP_V2)
62
76
  else:
63
- return self._authenticate(self._credentials.auth_type)
77
+ return self._authenticate(auth_type)
64
78
 
65
79
  def _authenticate(self, auth_type: str) -> str:
66
80
  """Handles authentication based on the auth_type."""
67
81
  try:
68
82
  match auth_type:
69
- case EnvironmentAuthType.MCSP:
83
+ case EnvironmentAuthType.MCSP | EnvironmentAuthType.MCSP_V1:
70
84
  url = self._credentials.iam_url if self._credentials.iam_url is not None else "https://iam.platform.saas.ibm.com"
71
85
  authenticator = MCSPAuthenticator(apikey=self._credentials.api_key, url=url)
86
+ case EnvironmentAuthType.MCSP_V2:
87
+ url = self._credentials.iam_url if self._credentials.iam_url is not None else "https://account-iam.platform.saas.ibm.com"
88
+ wxo_url = self._credentials.url
89
+ instance_id = wxo_url.split("instances/")[1]
90
+ authenticator = MCSPV2Authenticator(
91
+ apikey=self._credentials.api_key,
92
+ url=url,
93
+ scope_collection_type="services",
94
+ scope_id=instance_id
95
+ )
72
96
  case EnvironmentAuthType.IBM_CLOUD_IAM:
73
97
  authenticator = IAMAuthenticator(apikey=self._credentials.api_key, url=self._credentials.iam_url)
74
98
  case EnvironmentAuthType.CPD:
@@ -100,8 +124,10 @@ class ServiceInstance(BaseServiceInstance):
100
124
  raise ClientError(f"Unsupported authentication type: {auth_type}")
101
125
 
102
126
  return authenticator.token_manager.get_token()
127
+
103
128
  except Exception as e:
104
- raise ClientError(f"Error getting {auth_type.upper()} Token", e)
129
+ raise ClientError(f"Error getting {auth_type.upper()} Token", logg_messages=False)
130
+
105
131
 
106
132
 
107
133
  def _is_token_refresh_possible(self) -> bool:
@@ -16,22 +16,26 @@ from ibm_watsonx_orchestrate.cli.config import (
16
16
  from threading import Lock
17
17
  from ibm_watsonx_orchestrate.client.base_api_client import BaseAPIClient
18
18
  from ibm_watsonx_orchestrate.utils.utils import yaml_safe_load
19
+ from ibm_watsonx_orchestrate.cli.commands.channels.types import RuntimeEnvironmentType
19
20
  import logging
20
21
  from typing import TypeVar
21
22
  import os
22
23
  import jwt
23
24
  import time
25
+ import sys
24
26
 
25
27
  logger = logging.getLogger(__name__)
26
28
  LOCK = Lock()
27
29
  T = TypeVar("T", bound=BaseAPIClient)
28
30
 
31
+ def get_current_env_url() -> str:
32
+ cfg = Config()
33
+ active_env = cfg.read(CONTEXT_SECTION_HEADER, CONTEXT_ACTIVE_ENV_OPT)
34
+ return cfg.get(ENVIRONMENTS_SECTION_HEADER, active_env, ENV_WXO_URL_OPT)
29
35
 
30
36
  def is_local_dev(url: str | None = None) -> bool:
31
37
  if url is None:
32
- cfg = Config()
33
- active_env = cfg.read(CONTEXT_SECTION_HEADER, CONTEXT_ACTIVE_ENV_OPT)
34
- url = cfg.get(ENVIRONMENTS_SECTION_HEADER, active_env, ENV_WXO_URL_OPT)
38
+ url = get_current_env_url()
35
39
 
36
40
  if url.startswith("http://localhost"):
37
41
  return True
@@ -47,21 +51,58 @@ def is_local_dev(url: str | None = None) -> bool:
47
51
 
48
52
  return False
49
53
 
50
- def is_ibm_cloud():
51
- cfg = Config()
52
- active_env = cfg.read(CONTEXT_SECTION_HEADER, CONTEXT_ACTIVE_ENV_OPT)
53
- url = cfg.get(ENVIRONMENTS_SECTION_HEADER, active_env, ENV_WXO_URL_OPT)
54
+ def is_ga_platform(url: str | None = None) -> bool:
55
+ if url is None:
56
+ url = get_current_env_url()
57
+
58
+ if url.__contains__("orchestrate.ibm.com"):
59
+ return True
60
+ return False
61
+
62
+ def is_saas_env():
63
+ return is_ga_platform() or is_ibm_cloud_platform()
64
+
65
+ def is_ibm_cloud_platform(url:str | None = None) -> bool:
66
+ if url is None:
67
+ url = get_current_env_url()
54
68
 
55
69
  if url.__contains__("cloud.ibm.com"):
56
70
  return True
57
71
  return False
58
72
 
73
+ def is_cpd_env(url: str | None = None) -> bool:
74
+ if url is None:
75
+ url = get_current_env_url()
59
76
 
60
- def is_cpd_env(url: str) -> bool:
61
77
  if url.lower().startswith("https://cpd"):
62
78
  return True
63
79
  return False
64
80
 
81
+ def get_cpd_instance_id_from_url(url: str | None = None) -> str:
82
+ if url is None:
83
+ url = get_current_env_url()
84
+
85
+ if not is_cpd_env(url):
86
+ logger.error(f"The host {url} is not a CPD instance")
87
+ sys.exit(1)
88
+
89
+ url_fragments = url.split('/')
90
+ return url_fragments[-1] if url_fragments[-1] else url_fragments[-2]
91
+
92
+
93
+
94
+
95
+ def get_environment() -> str:
96
+ if is_local_dev():
97
+ return RuntimeEnvironmentType.LOCAL
98
+ if is_cpd_env():
99
+ return RuntimeEnvironmentType.CPD
100
+ if is_ibm_cloud_platform():
101
+ return RuntimeEnvironmentType.IBM_CLOUD
102
+ if is_ga_platform():
103
+ return RuntimeEnvironmentType.AWS
104
+ return None
105
+
65
106
  def check_token_validity(token: str) -> bool:
66
107
  try:
67
108
  token_claimset = jwt.decode(token, options={"verify_signature": False})
@@ -46,7 +46,7 @@ services:
46
46
  WXO_SERVER_URL: http://wxo-server:4321
47
47
  MAX_POOL: 60
48
48
  DEPLOYMENT_MODE: laptop
49
- SUFFIXLIST: '["global_05d7ba72", "ibm_184bdbd3"]'
49
+ SUFFIXLIST: ${CM_SUFFIXLIST:-[]}
50
50
  ports:
51
51
  - 3001:3001
52
52
 
@@ -302,7 +302,7 @@ services:
302
302
  JWT_PRIVATE_CONFIGS_PATH: "/"
303
303
  VECTOR_STORE_PROVIDER: ${VECTOR_STORE_PROVIDER:-milvus}
304
304
  CELERY_RESULTS_TTL: "3600"
305
- EVENT_BROKER_TTL: "-1"
305
+ EVENT_BROKER_TTL: "3600"
306
306
  TAVILY_API_KEY: ${TAVILY_API_KEY:-dummy_tavily_api_key}
307
307
  WATSONX_APIKEY: ${WATSONX_APIKEY}
308
308
  WATSONX_URL: ${WATSONX_URL}
@@ -404,7 +404,7 @@ services:
404
404
  WXAI_API_KEY: ${WXAI_API_KEY}
405
405
  VECTOR_STORE_PROVIDER: ${VECTOR_STORE_PROVIDER:-milvus}
406
406
  CELERY_RESULTS_TTL: "3600"
407
- EVENT_BROKER_TTL: "-1"
407
+ EVENT_BROKER_TTL: "3600"
408
408
  TAVILY_API_KEY: ${TAVILY_API_KEY:-dummy_tavily_api_key}
409
409
  WATSONX_APIKEY: ${WATSONX_APIKEY}
410
410
  WATSONX_URL: ${WATSONX_URL}
@@ -751,8 +751,8 @@ services:
751
751
  SERVER_HTTP_PORT: "9044"
752
752
  SERVER_CONTEXT_PATH:
753
753
  SERVER_JWK_URL: https://wo-ibm-dev.verify.ibm.com/v1.0/endpoint/default/jwks
754
- SERVER_STANDALONE_TASK_CALLBACK_URL: http://localhost:9044/task/callback/{thread_id}/{requestId}
755
- SERVER_FLOW_CALLBACK_URL: http://localhost:9044/v1/flows/{flow_instance_id}/{task_instance_id}/resume/async
754
+ SERVER_STANDALONE_TASK_CALLBACK_URL: http://wxo-tempus-runtime:9044/task/callback/{thread_id}/{requestId}
755
+ SERVER_FLOW_CALLBACK_URL: http://wxo-tempus-runtime:9044/v1/flows/{flow_instance_id}/{task_instance_id}/resume/async
756
756
  JWT_SECRET: ${JWT_SECRET}
757
757
  SERVER_INTERNAL_PROTOCOL: http
758
758
  SERVER_INTERNAL_HOSTNAME: wxo-tempus-runtime
@@ -780,19 +780,203 @@ services:
780
780
  LANGFUSE_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY:-pk-lf-7417757e-d6df-421b-957e-683b76acb5df}
781
781
  LANGFUSE_SECRET_KEY: ${LANGFUSE_PRIVATE_KEY:-sk-lf-7bc4da63-7b2b-40c0-b5eb-1e0cf64f9af2}
782
782
  LOG_LEVEL: info
783
+ DISABLE_FLOW_BINDING: true
784
+ DOCPROC_ENABLED: ${DOCPROC_ENABLED:-false}
785
+ DOCPROC_BASE_URL: http://wxo-doc-processing-infra-standalone:9080
783
786
  WO_API_KEY: ${WO_API_KEY}
784
787
  WO_INSTANCE: ${WO_INSTANCE}
785
788
  AUTHORIZATION_URL: ${AUTHORIZATION_URL}
786
789
  WO_AUTH_TYPE: ${WO_AUTH_TYPE}
787
790
  healthcheck:
788
791
  test: curl -k http://localhost:9044/readiness --fail
789
- interval: 5s
792
+ interval: 30s
790
793
  timeout: 60s
791
794
  retries: 5
792
795
  ports:
793
796
  - 9044:9044
794
797
  depends_on:
795
798
  - wxo-server-db
799
+
800
+ cpe:
801
+ image: ${CPE_REGISTRY:-us.icr.io/watson-orchestrate-private}/wxo-prompt-optimizer:${CPE_TAG:-latest}
802
+ platform: linux/amd64
803
+ restart: unless-stopped
804
+ environment:
805
+ WATSONX_APIKEY: ${WATSONX_APIKEY}
806
+ WATSONX_SPACE_ID: ${WATSONX_SPACE_ID}
807
+ WO_API_KEY: ${WO_API_KEY}
808
+ WO_USERNAME: ${WO_USERNAME}
809
+ WO_PASSWORD: ${WO_PASSWORD}
810
+ WO_INSTANCE: ${WO_INSTANCE}
811
+ USE_SAAS_ML_TOOLS_RUNTIME: ${USE_SAAS_ML_TOOLS_RUNTIME}
812
+ WO_AUTH_TYPE: ${WO_AUTH_TYPE}
813
+ AUTHORIZATION_URL: ${AUTHORIZATION_URL}
814
+ ports:
815
+ - 8081:8080
816
+
817
+ ########################
818
+ # DOCPROC dependencies
819
+ # DPS - 18081
820
+ # DPI - 19080 / 19443
821
+ # WDU - 18082
822
+ # WDU (Prometheus) - 18086
823
+ # DPS Cache - 18083
824
+ # LLM Service - 18084
825
+ ########################
826
+
827
+ wxo-doc-processing-service:
828
+ image: ${DOCPROC_REGISTRY:-us.icr.io/watson-orchestrate-private}/document-processing/wo_doc_processing_service:${DOCPROC_DPS_TAG:-20250606-172035-246-4191121}
829
+ platform: linux/amd64
830
+ restart: unless-stopped
831
+ environment:
832
+ SERVICE_NAME: wxo-doc-processing-service
833
+ LOG_LEVEL: info
834
+ VERIFY_CLIENT_CERT: 0
835
+ SERVICE_URL: ${SERVICE_URL:-https://wxo-doc-processing-cache:8080}
836
+ RATE_LIMITING_ENABLED: "false"
837
+ SHOULD_CACHE_IMAGES: "false"
838
+ HANDWRITING_ENABLED: "true"
839
+ WDU_RUNTIME_URL: wdu-runtime:8080
840
+ WDU_TIMEOUT_SECS: "180"
841
+ IBM_DPS_CACHE_SERVICE: https://wxo-doc-processing-cache:8080
842
+ profiles:
843
+ - docproc
844
+ # depends_on:
845
+ # wxo-doc-processing-cache:
846
+ # condition: service_healthy
847
+ ports:
848
+ - "18081:8080"
849
+ healthcheck:
850
+ test: ["CMD-SHELL", "curl -fk https://localhost:8080/ping"]
851
+ interval: 30s
852
+ timeout: 30s
853
+ retries: 10
854
+
855
+ wdu-runtime:
856
+ image: ${WDU_REGISTRY:-us.icr.io/watson-orchestrate-private}/document-processing/wdu-runtime:${WDU_TAG:-2.4.0}
857
+ platform: linux/amd64
858
+ restart: unless-stopped
859
+ environment:
860
+ MEMORY_MINIMAL: "true"
861
+ PREFLIGHT_MAX_SIZE: 10Mb
862
+ PREFLIGHT_MAX_PAGES: 600
863
+ RUNTIME_LIBRARY: "watson_doc_understanding"
864
+ profiles:
865
+ - docproc
866
+ ports:
867
+ - "18082:8080"
868
+ - "18086:8086"
869
+ volumes:
870
+ - "wdu-models:/models"
871
+ - "wdu-prometheus-files:/prometheus/"
872
+ tmpfs:
873
+ - "/dev/shm"
874
+ healthcheck:
875
+ test: ["CMD-SHELL", "/app/check_heartbeat.sh /tmp/heartbeat.txt 120"]
876
+ interval: 30s
877
+ timeout: 30s
878
+ retries: 10
879
+ depends_on:
880
+ wdu-model-copy:
881
+ condition: service_completed_successfully
882
+
883
+ wdu-model-copy:
884
+ image: ${WDU_REGISTRY:-us.icr.io/watson-orchestrate-private}/document-processing/wdu-models:${WDU_TAG:-2.4.0}
885
+ platform: linux/amd64
886
+ user: root
887
+ profiles:
888
+ - docproc
889
+ environment:
890
+ DEST_FOLDER: "/app/models"
891
+ volumes:
892
+ - "wdu-models:/app/models"
893
+ - "wdu-prometheus-files:/prometheus/"
894
+ tmpfs:
895
+ - "/dev/shm"
896
+
897
+ wxo-doc-processing-infra-standalone:
898
+ image: ${DOCPROC_REGISTRY:-us.icr.io/watson-orchestrate-private}/document-processing/wo-doc-processing-infra-standalone:${DOCPROC_DPI_TAG:-2025-06-13-dev-1}
899
+ platform: linux/amd64
900
+ profiles:
901
+ - docproc
902
+ environment:
903
+ PGHOST: wxo-server-db
904
+ PGPORT: "5432"
905
+ PGUSER: ${POSTGRES_USER:-postgres}
906
+ PGPASSWORD: ${POSTGRES_PASSWORD:-postgres}
907
+ PGDATABASE: wxo-document-processing-dpi
908
+ PGURL: "jdbc:postgresql://localhost:5432/wxo-document-processing-dpi?user=${POSTGRES_USER:-postgres}&password=${POSTGRES_PASSWORD:-postgres}"
909
+ USE_PGBOUNCER: "false"
910
+ S3_ACCESS_KEY: ${MINIO_ROOT_USER:-minioadmin}
911
+ S3_SECRET_KEY: ${MINIO_ROOT_PASSWORD:-watsonxorchestrate}
912
+ S3_ENDPOINT_URL: http://wxo-server-minio:9000
913
+ BUCKET_NAME_DEFAULT: wxo-document-processing-dpi-common
914
+ S3_FILERESOURCE_BUCKET: ${BUCKET_NAME_DEFAULT:-wxo-document-processing-dpi}
915
+ # S3_TLS_ENABLED: "true"
916
+ ENRICHMENT_BATCH_SIZE: "1000"
917
+ CIPHER_AES_REALM_KEY: "dGVzdHRlc3R0ZXN0dGVzdA=="
918
+ SIDECAR_METERED_ENABLED: "false"
919
+ DPI_DEBUG: "false"
920
+ DPI_WO_WDU_SERVER_ENDPOINT: https://wxo-doc-processing-service:8080
921
+ # DPI_RAG_SERVER_ENDPOINT: https://wxo-doc-processing-llm-service:8083
922
+ DISABLE_TLS: true
923
+ STANDALONE_DPI: "true"
924
+ depends_on:
925
+ wxo-doc-processing-dpi-minio-init:
926
+ condition: service_completed_successfully
927
+ wxo-doc-processing-infra-pg-init:
928
+ condition: service_completed_successfully
929
+ wxo-doc-processing-service:
930
+ condition: service_healthy
931
+ # wxo-doc-processing-llm-service:
932
+ # condition: service_healthy
933
+ ports:
934
+ - 19080:9080
935
+ - 19443:9443
936
+ healthcheck:
937
+ test: ["CMD-SHELL", "HEALTHCHECK_URL=http://localhost:9080/dps/v1/health /healthcheck-all.sh all"]
938
+ interval: 30s
939
+ timeout: 30s
940
+ retries: 10
941
+
942
+ wxo-doc-processing-infra-pg-init:
943
+ image: ${DOCPROC_REGISTRY:-us.icr.io/watson-orchestrate-private}/document-processing/wo-doc-processing-infra-pg-init:${DOCPROC_DPI_TAG:-2025-06-13-dev-1}
944
+ platform: linux/amd64
945
+ environment:
946
+ PGHOST: wxo-server-db
947
+ PGPORT: "5432"
948
+ PGUSER: ${POSTGRES_USER:-postgres}
949
+ PGPASSWORD: ${POSTGRES_PASSWORD:-postgres}
950
+ PGDATABASE: wxo-document-processing-dpi
951
+ PGURL: "jdbc:postgresql://localhost:5432/wxo-document-processing-dpi?user=${POSTGRES_USER:-postgres}&password=${POSTGRES_PASSWORD:-postgres}"
952
+ USE_PGBOUNCER: "false"
953
+ entrypoint: /liquibase-init.sh
954
+ - pgbouncer
955
+ profiles:
956
+ - docproc
957
+ depends_on:
958
+ wxo-server-db:
959
+ condition: service_started
960
+ healthcheck:
961
+ test: ["CMD-SHELL", "psql -h localhost -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_PASSWORD:-postgres}"]
962
+ interval: 1s
963
+ timeout: 5s
964
+ retries: 50
965
+
966
+ wxo-doc-processing-dpi-minio-init:
967
+ image: ${OPENSOURCE_REGISTRY_PROXY:-docker.io}/minio/mc:latest
968
+ platform: linux/amd64
969
+ profiles:
970
+ - docproc
971
+ depends_on:
972
+ wxo-server-minio:
973
+ condition: service_healthy
974
+ entrypoint: >
975
+ /bin/sh -c "
976
+ /usr/bin/mc alias set wxo-server-minio http://wxo-server-minio:9000 ${MINIO_ROOT_USER:-minioadmin} ${MINIO_ROOT_PASSWORD:-watsonxorchestrate};
977
+ /usr/bin/mc mb wxo-server-minio/wxo-document-processing-dpi;
978
+ exit 0;
979
+ "
796
980
 
797
981
  volumes:
798
982
  tools:
@@ -817,6 +1001,14 @@ volumes:
817
1001
  driver: local
818
1002
  langfuse_clickhouse_logs:
819
1003
  driver: local
1004
+ wdu-prometheus-files:
1005
+ driver: local
1006
+ driver_opts:
1007
+ type: tmpfs
1008
+ device: tmpfs
1009
+ o: "uid=1000,gid=1000,mode=1777"
1010
+ wdu-models:
1011
+ driver: local
820
1012
  es_data:
821
1013
 
822
1014
  networks:
@@ -42,7 +42,7 @@ LANGFUSE_PRIVATE_KEY=sk-lf-7bc4da63-7b2b-40c0-b5eb-1e0cf64f9af2
42
42
 
43
43
  CELERY_WORKER_CONCURRENCY=12
44
44
  CELERY_RESULTS_TTL="3600"
45
- EVENT_BROKER_TTL="-1"
45
+ EVENT_BROKER_TTL="3600"
46
46
 
47
47
  # START -- IMAGE REGISTRIES AND TAGS
48
48
  # The registry URL to pull the private images from, including the name of the repository in the registry.
@@ -53,41 +53,41 @@ EVENT_BROKER_TTL="-1"
53
53
  REGISTRY_URL=
54
54
 
55
55
 
56
- SERVER_TAG=02-07-2025
56
+ SERVER_TAG=22-07-2025
57
57
  SERVER_REGISTRY=
58
58
 
59
- WORKER_TAG=02-07-2025
59
+ WORKER_TAG=22-07-2025
60
60
  WORKER_REGISTRY=
61
61
 
62
- AI_GATEWAY_TAG=01-07-2025
62
+ AI_GATEWAY_TAG=21-07-2025
63
63
  AI_GATEWAY_REGISTRY=
64
64
 
65
- AGENT_GATEWAY_TAG=23-06-2025
65
+ AGENT_GATEWAY_TAG=07-07-2025
66
66
  AGENT_GATEWAY_REGISTRY=
67
67
 
68
68
  DB_REGISTRY=
69
69
  # If you build multiarch set all three of these to the same, we have a pr against main
70
70
  # to not have this separation, but we can merge it later
71
- DBTAG=24-06-2025-v1
71
+ DBTAG=22-07-2025
72
72
  AMDDBTAG=24-06-2025-v1
73
73
  ARM64DBTAG=24-06-2025-v1
74
74
 
75
75
  UI_REGISTRY=
76
- UITAG=27-06-2025
76
+ UITAG=23-07-2025
77
77
 
78
78
  CM_REGISTRY=
79
- CM_TAG=27-06-2025
79
+ CM_TAG=24-07-2025
80
80
 
81
- TRM_TAG=26-06-2025
81
+ TRM_TAG=23-07-2025-3c60549f0bac275de3e5736265a3fd49cdd3a203
82
82
  TRM_REGISTRY=
83
83
 
84
- TR_TAG=26-06-2025
84
+ TR_TAG=23-07-2025-3c60549f0bac275de3e5736265a3fd49cdd3a203
85
85
  TR_REGISTRY=
86
86
 
87
- BUILDER_TAG=02-07-2025
87
+ BUILDER_TAG=22-07-2025-v1
88
88
  BUILDER_REGISTRY=
89
89
 
90
- FLOW_RUNTIME_TAG=23-06-2025
90
+ FLOW_RUNTIME_TAG=15-07-2025
91
91
  FLOW_RUMTIME_REGISTRY=
92
92
 
93
93
 
@@ -100,6 +100,18 @@ JAEGER_PROXY_REGISTRY=
100
100
  SOCKET_HANDLER_TAG=29-05-2025
101
101
  SOCKET_HANDLER_REGISTRY=
102
102
 
103
+ CPE_TAG=17-07-2025
104
+ CPE_REGISTRY=
105
+
106
+ # IBM Document Processing
107
+ WDU_TAG=2.5.0
108
+ WDU_REGISTRY=
109
+
110
+ DOCPROC_DPS_TAG=20250610-183301-248-865fbc1
111
+ DOCPROC_LLMSERVICE_TAG=20250604-192056-107-e1d4d66
112
+ DOCPROC_CACHE_TAG=20250610-214940-68-f3258f4
113
+ DOCPROC_DPI_TAG=20250702-000808-237-7b1e424d
114
+ DOCPROC_REGISTRY=
103
115
 
104
116
  # END -- IMAGE REGISTRIES AND TAGS
105
117
 
@@ -152,6 +164,14 @@ DB_CONN_LIFE=
152
164
  DB_MAX_IDLE_CONN=
153
165
  DB_MAX_CONN=
154
166
  SERVER_HOST=
167
+ WO_API_KEY=
168
+ WO_PASSWORD=
169
+ WO_USERNAME=
170
+ WO_INSTANCE=
171
+ AUTHORIZATION_URL=
172
+ WO_AUTH_TYPE=
173
+ PYTHONPATH=
174
+ CM_SUFFIXLIST=
155
175
 
156
176
  # Use your machine's local IP address for external async tool communication.
157
177
  CALLBACK_HOST_URL=
@@ -160,3 +180,7 @@ AGENTOPS_API_KEY_AUTH_ENABLED=true
160
180
  AGENTOPS_API_KEY=qwertyuiop
161
181
 
162
182
  RUNTIME_MANAGER_API_KEY=example
183
+
184
+
185
+ # IBM Document Processing
186
+ SERVICE_URL=https://wxo-doc-processing-cache:8080
@@ -1,6 +1,8 @@
1
1
  from .constants import START, END, RESERVED
2
- from ..types import FlowContext, TaskData, TaskEventType
3
- from ..node import UserNode, AgentNode, StartNode, EndNode, PromptNode, ToolNode
2
+
3
+ from ..types import FlowContext, TaskData, TaskEventType, File, DecisionsCondition, DecisionsRule
4
+ from ..node import UserNode, AgentNode, StartNode, EndNode, PromptNode, ToolNode, DecisionsNode
5
+
4
6
  from .flow import Flow, CompiledFlow, FlowRun, FlowEvent, FlowEventType, FlowFactory, MatchPolicy, WaitPolicy, ForeachPolicy, Branch, Foreach, Loop
5
7
  from .decorators import flow
6
8
  from ..data_map import Assignment, DataMap
@@ -14,13 +16,16 @@ __all__ = [
14
16
  "FlowContext",
15
17
  "TaskData",
16
18
  "TaskEventType",
19
+ "File",
17
20
 
21
+ "DocProcNode",
18
22
  "UserNode",
19
23
  "AgentNode",
20
24
  "StartNode",
21
25
  "EndNode",
22
26
  "PromptNode",
23
27
  "ToolNode",
28
+ "DecisionsNode",
24
29
  "Assignment",
25
30
  "DataMap",
26
31
 
@@ -36,8 +41,8 @@ __all__ = [
36
41
  "Branch",
37
42
  "Foreach",
38
43
  "Loop",
44
+ "DecisionsCondition",
45
+ "DecisionsRule",
39
46
 
40
- "user",
41
- "flow_spec",
42
47
  "flow"
43
48
  ]
@@ -33,7 +33,8 @@ def flow(*args,
33
33
  description: str|None=None,
34
34
  input_schema: type[BaseModel] | None = None,
35
35
  output_schema: type[BaseModel] | None = None,
36
- initiators: Sequence[str] = ()):
36
+ initiators: Sequence[str] = (),
37
+ schedulable: bool = False):
37
38
  """Decorator to mark a function as a flow model builder."""
38
39
 
39
40
  def decorator(func: Callable):
@@ -58,7 +59,8 @@ def flow(*args,
58
59
  description = node_spec.description,
59
60
  input_schema = input_schema,
60
61
  output_schema = output_schema,
61
- initiators = initiators)
62
+ initiators = initiators,
63
+ schedulable = schedulable)
62
64
 
63
65
  # logger.info("Creating flow model: %s", a_model.spec.name)
64
66
 
@@ -5,9 +5,11 @@ from dotenv import load_dotenv
5
5
  import os
6
6
 
7
7
  from typing import (
8
- AsyncIterator, Union
8
+ AsyncIterator, TypeVar, Union
9
9
  )
10
10
 
11
+ from enum import Enum
12
+
11
13
  from ..types import (
12
14
  FlowEventType, TaskEventType, FlowEvent, FlowContext
13
15
  )
@@ -66,12 +68,11 @@ def deserialize_flow_event(byte_data: bytes) -> FlowEvent:
66
68
 
67
69
  return flow_event
68
70
 
71
+ def is_valid_enum_value(value: str, enum_type: type[Enum]) -> bool:
72
+ return value in (item.value for item in enum_type)
73
+
69
74
  def get_event_type(selected_event_type: str) -> Union[FlowEventType, TaskEventType]:
70
- """Selects the right event type from the corresponding enumerator"""
71
- eventKind = selected_event_type.upper()
72
- if eventKind in FlowEventType.__members__:
73
- return FlowEventType(selected_event_type)
74
- elif eventKind in TaskEventType.__members__:
75
- return TaskEventType(selected_event_type)
76
- else:
77
- raise ValueError(f"Invalid event type: {eventKind}")
75
+ for enum_type in [FlowEventType, TaskEventType]:
76
+ if is_valid_enum_value(selected_event_type, enum_type):
77
+ return enum_type(selected_event_type)
78
+ raise ValueError(f"Invalid event type: {selected_event_type}")