dao-ai 0.1.14__py3-none-any.whl → 0.1.16__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.
dao_ai/cli.py CHANGED
@@ -63,16 +63,26 @@ def detect_cloud_provider(profile: Optional[str] = None) -> Optional[str]:
63
63
  Cloud provider string ('azure', 'aws', 'gcp') or None if detection fails
64
64
  """
65
65
  try:
66
+ import os
66
67
  from databricks.sdk import WorkspaceClient
67
68
 
69
+ # Check for environment variables that might override profile
70
+ if profile and os.environ.get("DATABRICKS_HOST"):
71
+ logger.warning(
72
+ f"DATABRICKS_HOST environment variable is set, which may override --profile {profile}"
73
+ )
74
+
68
75
  # Create workspace client with optional profile
69
76
  if profile:
77
+ logger.debug(f"Creating WorkspaceClient with profile: {profile}")
70
78
  w = WorkspaceClient(profile=profile)
71
79
  else:
80
+ logger.debug("Creating WorkspaceClient with default/ambient credentials")
72
81
  w = WorkspaceClient()
73
82
 
74
83
  # Get the workspace URL from config
75
84
  host = w.config.host
85
+ logger.debug(f"WorkspaceClient host: {host}, profile used: {profile}")
76
86
  if not host:
77
87
  logger.warning("Could not determine workspace URL for cloud detection")
78
88
  return None
@@ -1143,7 +1153,7 @@ def run_databricks_command(
1143
1153
  app_config: AppConfig = AppConfig.from_file(config_path) if config_path else None
1144
1154
  normalized_name: str = normalize_name(app_config.app.name) if app_config else None
1145
1155
 
1146
- # Auto-detect cloud provider if not specified
1156
+ # Auto-detect cloud provider if not specified (used for node_type selection)
1147
1157
  if not cloud:
1148
1158
  cloud = detect_cloud_provider(profile)
1149
1159
  if cloud:
@@ -1156,10 +1166,12 @@ def run_databricks_command(
1156
1166
  if config_path and app_config:
1157
1167
  generate_bundle_from_template(config_path, normalized_name)
1158
1168
 
1159
- # Use cloud as target (azure, aws, gcp) - can be overridden with explicit --target
1169
+ # Use app-specific cloud target: {app_name}-{cloud}
1170
+ # This ensures each app has unique deployment identity while supporting cloud-specific settings
1171
+ # Can be overridden with explicit --target
1160
1172
  if not target:
1161
- target = cloud
1162
- logger.debug(f"Using cloud-based target: {target}")
1173
+ target = f"{normalized_name}-{cloud}"
1174
+ logger.info(f"Using app-specific cloud target: {target}")
1163
1175
 
1164
1176
  # Build databricks command
1165
1177
  # --profile is a global flag, --target is a subcommand flag for 'bundle'
dao_ai/config.py CHANGED
@@ -373,11 +373,13 @@ class IsDatabricksResource(ABC, BaseModel):
373
373
  """
374
374
  from dao_ai.utils import normalize_host
375
375
 
376
+ logger.trace(f"workspace_client_from called", context=context, on_behalf_of_user=self.on_behalf_of_user)
377
+
376
378
  # Check if we have headers in context for OBO
377
379
  if context and context.headers and self.on_behalf_of_user:
378
380
  headers = context.headers
379
381
  # Try both lowercase and title-case header names (HTTP headers are case-insensitive)
380
- forwarded_token = headers.get("x-forwarded-access-token") or headers.get(
382
+ forwarded_token: str = headers.get("x-forwarded-access-token") or headers.get(
381
383
  "X-Forwarded-Access-Token"
382
384
  )
383
385
 
@@ -2088,9 +2090,10 @@ class McpFunctionModel(BaseFunctionModel, IsDatabricksResource):
2088
2090
  if self.sql:
2089
2091
  return f"{workspace_host}/api/2.0/mcp/sql"
2090
2092
 
2091
- # Databricks App
2093
+ # Databricks App - MCP endpoint is at {app_url}/mcp
2092
2094
  if self.app:
2093
- return self.app.url
2095
+ app_url = self.app.url.rstrip("/")
2096
+ return f"{app_url}/mcp"
2094
2097
 
2095
2098
  # Vector Search
2096
2099
  if self.vector_search:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dao-ai
3
- Version: 0.1.14
3
+ Version: 0.1.16
4
4
  Summary: DAO AI: A modular, multi-agent orchestration framework for complex AI workflows. Supports agent handoff, tool integration, and dynamic configuration via YAML.
5
5
  Project-URL: Homepage, https://github.com/natefleming/dao-ai
6
6
  Project-URL: Documentation, https://natefleming.github.io/dao-ai
@@ -1,7 +1,7 @@
1
1
  dao_ai/__init__.py,sha256=18P98ExEgUaJ1Byw440Ct1ty59v6nxyWtc5S6Uq2m9Q,1062
2
2
  dao_ai/catalog.py,sha256=sPZpHTD3lPx4EZUtIWeQV7VQM89WJ6YH__wluk1v2lE,4947
3
- dao_ai/cli.py,sha256=1Ox8qjLKRlrKu2YXozm0lWoeZnDCouECeZSGVPkQgIQ,50923
4
- dao_ai/config.py,sha256=7MDuX7xGSyDuBpdFZbKNDUPuTiuVe9onnUEGFtDI0jc,130123
3
+ dao_ai/cli.py,sha256=6qwlS07_Tei6iEPXIJ-19cQVnLXd7vJDpuY4Qu0k96E,51634
4
+ dao_ai/config.py,sha256=9RcyCNiLg0YlARZd-ZJ9M4oirNX5emxaIS23VHca_Z4,130328
5
5
  dao_ai/graph.py,sha256=1-uQlo7iXZQTT3uU8aYu0N5rnhw5_g_2YLwVsAs6M-U,1119
6
6
  dao_ai/logging.py,sha256=lYy4BmucCHvwW7aI3YQkQXKJtMvtTnPDu9Hnd7_O4oc,1556
7
7
  dao_ai/messages.py,sha256=4ZBzO4iFdktGSLrmhHzFjzMIt2tpaL-aQLHOQJysGnY,6959
@@ -68,8 +68,8 @@ dao_ai/tools/sql.py,sha256=FG-Aa0FAUAnhCuZvao1J-y-cMM6bU5eCujNbsYn0xDw,7864
68
68
  dao_ai/tools/time.py,sha256=tufJniwivq29y0LIffbgeBTIDE6VgrLpmVf8Qr90qjw,9224
69
69
  dao_ai/tools/unity_catalog.py,sha256=oBlW6pH-Ne08g60QW9wVi_tyeVYDiecuNoxQbIIFmN8,16515
70
70
  dao_ai/tools/vector_search.py,sha256=LF_72vlEF6TwUjKVv6nkUetLK766l9Kl6DQQTc9ebJI,15888
71
- dao_ai-0.1.14.dist-info/METADATA,sha256=3cgCatKya02uIxRs9fP-P2R_GbV3DfrQ-_JsknH0kkg,16830
72
- dao_ai-0.1.14.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
73
- dao_ai-0.1.14.dist-info/entry_points.txt,sha256=Xa-UFyc6gWGwMqMJOt06ZOog2vAfygV_DSwg1AiP46g,43
74
- dao_ai-0.1.14.dist-info/licenses/LICENSE,sha256=YZt3W32LtPYruuvHE9lGk2bw6ZPMMJD8yLrjgHybyz4,1069
75
- dao_ai-0.1.14.dist-info/RECORD,,
71
+ dao_ai-0.1.16.dist-info/METADATA,sha256=hKYbqBIQ8eNjVtpkhysLAJNS1ISg9Tuy1ek9SggxSC4,16830
72
+ dao_ai-0.1.16.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
73
+ dao_ai-0.1.16.dist-info/entry_points.txt,sha256=Xa-UFyc6gWGwMqMJOt06ZOog2vAfygV_DSwg1AiP46g,43
74
+ dao_ai-0.1.16.dist-info/licenses/LICENSE,sha256=YZt3W32LtPYruuvHE9lGk2bw6ZPMMJD8yLrjgHybyz4,1069
75
+ dao_ai-0.1.16.dist-info/RECORD,,