daita-agents 0.2.0__py3-none-any.whl → 0.2.3__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.
daita/cli/main.py CHANGED
@@ -59,8 +59,8 @@ def _import_core_functions():
59
59
  from .core.status import show_project_status
60
60
  from .core.logs import show_deployment_logs
61
61
  from .core.deployments import (
62
- list_deployments, download_deployment, show_deployment_details,
63
- rollback_deployment, delete_deployment
62
+ list_deployments, show_deployment_details,
63
+ delete_deployment
64
64
  )
65
65
  from .core.run import (
66
66
  run_remote_execution, list_remote_executions, get_execution_logs
@@ -73,9 +73,7 @@ def _import_core_functions():
73
73
  show_project_status,
74
74
  show_deployment_logs,
75
75
  list_deployments,
76
- download_deployment,
77
76
  show_deployment_details,
78
- rollback_deployment,
79
77
  delete_deployment,
80
78
  run_remote_execution,
81
79
  list_remote_executions,
@@ -138,11 +136,20 @@ def cli(ctx, verbose, quiet):
138
136
  log_level = logging.ERROR
139
137
  else:
140
138
  log_level = logging.INFO
141
-
139
+
140
+ # Configure root logger with higher level to avoid noise from libraries
142
141
  logging.basicConfig(
143
- level=log_level,
142
+ level=logging.WARNING, # Only show warnings/errors from third-party libraries
144
143
  format="%(levelname)s: %(message)s"
145
144
  )
145
+
146
+ # Set our own loggers to the desired level
147
+ daita_logger = logging.getLogger('daita')
148
+ daita_logger.setLevel(log_level)
149
+
150
+ # Also set CLI logger
151
+ cli_logger = logging.getLogger(__name__)
152
+ cli_logger.setLevel(log_level)
146
153
 
147
154
  # Store options in context
148
155
  ctx.obj['verbose'] = verbose
@@ -323,28 +330,13 @@ def list_cmd(ctx, project_name, limit):
323
330
  click.echo(f" Error: {str(e)}", err=True)
324
331
  sys.exit(1)
325
332
 
326
- @deployments.command()
327
- @click.argument('deployment_id')
328
- @click.option('--output', '-o', help='Output file path')
329
- @click.pass_context
330
- def download(ctx, deployment_id, output):
331
- """Download a deployment package."""
332
- try:
333
- download_deployment_func = ctx.obj['core_functions'][7]
334
- asyncio.run(download_deployment_func(deployment_id, output))
335
- except Exception as e:
336
- if ctx.obj.get('verbose'):
337
- logging.exception("Download deployment failed")
338
- click.echo(f" Error: {str(e)}", err=True)
339
- sys.exit(1)
340
-
341
333
  @deployments.command()
342
334
  @click.argument('deployment_id')
343
335
  @click.pass_context
344
336
  def show(ctx, deployment_id):
345
337
  """Show detailed deployment information."""
346
338
  try:
347
- show_deployment_details_func = ctx.obj['core_functions'][8]
339
+ show_deployment_details_func = ctx.obj['core_functions'][7]
348
340
  asyncio.run(show_deployment_details_func(deployment_id))
349
341
  except Exception as e:
350
342
  if ctx.obj.get('verbose'):
@@ -352,20 +344,6 @@ def show(ctx, deployment_id):
352
344
  click.echo(f" Error: {str(e)}", err=True)
353
345
  sys.exit(1)
354
346
 
355
- @deployments.command()
356
- @click.argument('deployment_id')
357
- @click.pass_context
358
- def rollback(ctx, deployment_id):
359
- """Rollback to a previous deployment."""
360
- try:
361
- rollback_deployment_func = ctx.obj['core_functions'][9]
362
- asyncio.run(rollback_deployment_func(deployment_id, 'production'))
363
- except Exception as e:
364
- if ctx.obj.get('verbose'):
365
- logging.exception("Rollback deployment failed")
366
- click.echo(f" Error: {str(e)}", err=True)
367
- sys.exit(1)
368
-
369
347
  @deployments.command()
370
348
  @click.argument('deployment_id')
371
349
  @click.option('--force', is_flag=True, help='Skip confirmation')
@@ -373,7 +351,7 @@ def rollback(ctx, deployment_id):
373
351
  def delete(ctx, deployment_id, force):
374
352
  """Delete a deployment and its Lambda functions."""
375
353
  try:
376
- delete_deployment_func = ctx.obj['core_functions'][10]
354
+ delete_deployment_func = ctx.obj['core_functions'][8]
377
355
  asyncio.run(delete_deployment_func(deployment_id, force))
378
356
  except Exception as e:
379
357
  if ctx.obj.get('verbose'):
@@ -476,7 +454,7 @@ def run(ctx, target_name, target_type, data_file, data_json, task, follow, timeo
476
454
  """Execute an agent or workflow remotely in the cloud."""
477
455
  environment = 'production' # Only production is supported
478
456
  try:
479
- run_remote_execution_func = ctx.obj['core_functions'][11]
457
+ run_remote_execution_func = ctx.obj['core_functions'][9]
480
458
  success = asyncio.run(run_remote_execution_func(
481
459
  target_name=target_name,
482
460
  target_type=target_type,
daita/cli/utils.py CHANGED
@@ -496,7 +496,7 @@ Next steps:
496
496
  4. daita test --watch # Development mode (free)
497
497
 
498
498
  Ready for production?
499
- • daita push staging # Deploy to cloud (requires API key)
499
+ • daita push # Deploy to cloud (requires API key)
500
500
  • Get your API key at daita-tech.io
501
501
  • Start your free trial with full monitoring & insights!"""
502
502
 
daita/plugins/__init__.py CHANGED
@@ -5,6 +5,7 @@ This module provides database, API, cloud storage, search, collaboration, and MC
5
5
  - PostgreSQL plugin for async database operations
6
6
  - MySQL plugin for async database operations
7
7
  - MongoDB plugin for async document database operations
8
+ - Snowflake plugin for cloud data warehouse operations
8
9
  - REST API plugin for HTTP client functionality
9
10
  - AWS S3 plugin for cloud object storage operations
10
11
  - Slack plugin for team collaboration and notifications
@@ -16,13 +17,17 @@ without over-engineering.
16
17
 
17
18
  Usage:
18
19
  ```python
19
- from daita.plugins import postgresql, mysql, mongodb, rest, s3, slack, elasticsearch, mcp
20
+ from daita.plugins import postgresql, mysql, mongodb, snowflake, rest, s3, slack, elasticsearch, mcp
20
21
  from daita import SubstrateAgent
21
22
 
22
23
  # Database plugins
23
24
  async with postgresql(host="localhost", database="mydb") as db:
24
25
  results = await db.query("SELECT * FROM users")
25
26
 
27
+ # Snowflake plugin
28
+ async with snowflake(account="xy12345", warehouse="COMPUTE_WH", database="MYDB", user="user", password="pass") as db:
29
+ results = await db.query("SELECT * FROM customers LIMIT 10")
30
+
26
31
  # REST API plugin
27
32
  async with rest(base_url="https://api.example.com") as api:
28
33
  data = await api.get("/users")
@@ -52,6 +57,7 @@ Usage:
52
57
  from .postgresql import PostgreSQLPlugin, postgresql
53
58
  from .mysql import MySQLPlugin, mysql
54
59
  from .mongodb import MongoDBPlugin, mongodb
60
+ from .snowflake import SnowflakePlugin, snowflake
55
61
 
56
62
  # API plugins
57
63
  from .rest import RESTPlugin, rest
@@ -90,7 +96,11 @@ class PluginAccess:
90
96
  def mongodb(self, **kwargs) -> MongoDBPlugin:
91
97
  """Create MongoDB plugin."""
92
98
  return mongodb(**kwargs)
93
-
99
+
100
+ def snowflake(self, **kwargs) -> SnowflakePlugin:
101
+ """Create Snowflake plugin."""
102
+ return snowflake(**kwargs)
103
+
94
104
  def rest(self, **kwargs) -> RESTPlugin:
95
105
  """Create REST API plugin."""
96
106
  return rest(**kwargs)
@@ -117,6 +127,7 @@ __all__ = [
117
127
  'PostgreSQLPlugin',
118
128
  'MySQLPlugin',
119
129
  'MongoDBPlugin',
130
+ 'SnowflakePlugin',
120
131
  'RESTPlugin',
121
132
  'S3Plugin',
122
133
  'SlackPlugin',
@@ -127,6 +138,7 @@ __all__ = [
127
138
  'postgresql',
128
139
  'mysql',
129
140
  'mongodb',
141
+ 'snowflake',
130
142
  'rest',
131
143
  's3',
132
144
  'slack',