tinybird 0.0.1.dev288__py3-none-any.whl → 0.0.1.dev289__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.

Potentially problematic release.


This version of tinybird might be problematic. Click here for more details.

@@ -1877,16 +1877,6 @@ def parse(
1877
1877
  doc.shared_with += workspaces
1878
1878
  total_workspaces += len(workspaces)
1879
1879
 
1880
- # Add warning once if any workspaces were found
1881
- if total_workspaces > 0:
1882
- warnings.append(
1883
- DatafileParseWarning(
1884
- message=(
1885
- f"{kwargs['cmd'].upper()} is not fully implemented in Forward and will be ignored while this warning is present."
1886
- )
1887
- )
1888
- )
1889
-
1890
1880
  # Validate that at least one workspace was provided
1891
1881
  if total_workspaces == 0:
1892
1882
  raise DatafileSyntaxError(
tinybird/sql_toolset.py CHANGED
@@ -144,7 +144,7 @@ def format_where_for_mutation_command(where_clause: str) -> str:
144
144
  return f"DELETE WHERE {quoted_condition[1:-1]}"
145
145
 
146
146
 
147
- @lru_cache(maxsize=2**13)
147
+ @lru_cache(maxsize=2**15)
148
148
  def sql_get_used_tables_cached(
149
149
  sql: str,
150
150
  raising: bool = False,
@@ -301,7 +301,7 @@ def replacements_to_tuples(replacements: dict) -> dict:
301
301
  return parsed_replacements
302
302
 
303
303
 
304
- @lru_cache(maxsize=2**13)
304
+ @lru_cache(maxsize=2**15)
305
305
  def replace_tables_chquery_cached(
306
306
  sql: str,
307
307
  sorted_replacements: Optional[tuple] = None,
tinybird/tb/__cli__.py CHANGED
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
4
4
  __url__ = 'https://www.tinybird.co/docs/forward/commands'
5
5
  __author__ = 'Tinybird'
6
6
  __author_email__ = 'support@tinybird.co'
7
- __version__ = '0.0.1.dev288'
8
- __revision__ = '6cd5b6c'
7
+ __version__ = '0.0.1.dev289'
8
+ __revision__ = 'ac20837'
@@ -50,7 +50,13 @@ from tinybird.tb.modules.agent.tools.get_endpoint_stats import get_endpoint_stat
50
50
  from tinybird.tb.modules.agent.tools.get_openapi_definition import get_openapi_definition
51
51
  from tinybird.tb.modules.agent.tools.plan import complete_plan, plan
52
52
  from tinybird.tb.modules.agent.tools.secret import create_or_update_secrets
53
- from tinybird.tb.modules.agent.utils import AgentRunCancelled, TinybirdAgentContext, show_confirmation, show_input
53
+ from tinybird.tb.modules.agent.utils import (
54
+ AgentRunCancelled,
55
+ SubAgentRunCancelled,
56
+ TinybirdAgentContext,
57
+ show_confirmation,
58
+ show_input,
59
+ )
54
60
  from tinybird.tb.modules.build_common import process as build_process
55
61
  from tinybird.tb.modules.common import (
56
62
  _analyze,
@@ -207,8 +213,11 @@ class TinybirdAgent:
207
213
  Returns:
208
214
  str: The result of the command.
209
215
  """
210
- result = self.command_agent.run(task, deps=ctx.deps, usage=ctx.usage)
211
- return f"Result: {result.output}\nDo not repeat in your response the result again, because it is already displayed in the terminal."
216
+ try:
217
+ result = self.command_agent.run(task, deps=ctx.deps, usage=ctx.usage)
218
+ return f"Result: {result.output}\nDo not repeat in your response the result again, because it is already displayed in the terminal."
219
+ except SubAgentRunCancelled as e:
220
+ return f"User does not want to continue with the proposed solution. Reason: {e}"
212
221
 
213
222
  @self.agent.tool
214
223
  def explore_data(ctx: RunContext[TinybirdAgentContext], task: str) -> str:
@@ -3,7 +3,13 @@ import subprocess
3
3
  import click
4
4
  from pydantic_ai import RunContext
5
5
 
6
- from tinybird.tb.modules.agent.utils import AgentRunCancelled, TinybirdAgentContext, show_confirmation, show_input
6
+ from tinybird.tb.modules.agent.utils import (
7
+ AgentRunCancelled,
8
+ SubAgentRunCancelled,
9
+ TinybirdAgentContext,
10
+ show_confirmation,
11
+ show_input,
12
+ )
7
13
  from tinybird.tb.modules.feedback_manager import FeedbackManager
8
14
 
9
15
 
@@ -24,7 +30,7 @@ def run_command(ctx: RunContext[TinybirdAgentContext], command: str):
24
30
  if confirmation == "review":
25
31
  feedback = show_input(ctx.deps.workspace_name)
26
32
  ctx.deps.thinking_animation.start()
27
- return f"User did not confirm the command and gave the following feedback: {feedback}"
33
+ raise SubAgentRunCancelled(f"""User did not confirm the command `{command}`. Reason: {feedback}.""")
28
34
 
29
35
  click.echo(FeedbackManager.highlight(message=f"» Running command: {command}"))
30
36
  command = command.replace("tb", "tb --no-version-warning")
@@ -32,7 +38,7 @@ def run_command(ctx: RunContext[TinybirdAgentContext], command: str):
32
38
  click.echo(result.stdout)
33
39
  ctx.deps.thinking_animation.start()
34
40
  return result.stdout
35
- except AgentRunCancelled as e:
41
+ except (AgentRunCancelled, SubAgentRunCancelled) as e:
36
42
  raise e
37
43
  except Exception as e:
38
44
  click.echo(FeedbackManager.error(message=f"Error running command: {e}"))
@@ -721,6 +721,12 @@ class AgentRunCancelled(Exception):
721
721
  pass
722
722
 
723
723
 
724
+ class SubAgentRunCancelled(Exception):
725
+ """Exception raised when sub-agent cancels an operation"""
726
+
727
+ pass
728
+
729
+
724
730
  def show_confirmation(title: str, skip_confirmation: bool = False, show_review: bool = True) -> ConfirmationResult:
725
731
  if skip_confirmation:
726
732
  return "yes"
@@ -24,6 +24,7 @@ from tinybird.tb.modules.telemetry import add_telemetry_event
24
24
  TB_IMAGE_NAME = "tinybirdco/tinybird-local:latest"
25
25
  TB_CONTAINER_NAME = "tinybird-local"
26
26
  TB_LOCAL_PORT = int(os.getenv("TB_LOCAL_PORT", 7181))
27
+ TB_LOCAL_CLICKHOUSE_INTERFACE_PORT = int(os.getenv("TB_LOCAL_CLICKHOUSE_INTERFACE_PORT", 7182))
27
28
  TB_LOCAL_HOST = re.sub(r"^https?://", "", os.getenv("TB_LOCAL_HOST", "localhost"))
28
29
  TB_LOCAL_ADDRESS = f"http://{TB_LOCAL_HOST}:{TB_LOCAL_PORT}"
29
30
  TB_LOCAL_DEFAULT_WORKSPACE_NAME = "Tinybird_Local_Testing"
@@ -269,7 +270,7 @@ def start_tinybird_local(
269
270
  TB_IMAGE_NAME,
270
271
  name=TB_CONTAINER_NAME,
271
272
  detach=True,
272
- ports={"7181/tcp": TB_LOCAL_PORT},
273
+ ports={"7181/tcp": TB_LOCAL_PORT, "7182/tcp": TB_LOCAL_CLICKHOUSE_INTERFACE_PORT},
273
274
  remove=False,
274
275
  platform="linux/amd64",
275
276
  environment=environment,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev288
3
+ Version: 0.0.1.dev289
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/forward/commands
6
6
  Author: Tinybird
@@ -8,17 +8,17 @@ tinybird/service_datasources.py,sha256=o6Az3T6OvcChR_7GXRu7sJH173KzGg1Gv-dNd0bI_
8
8
  tinybird/sql.py,sha256=UZJLop6zA9tTPEaS-Fq7M-QyzmC5uV_tIeXZzkjnhso,48299
9
9
  tinybird/sql_template.py,sha256=kaF5pi-f2JiWSYXEF8JsU1OIxvdu2homHnw4MYjq0n8,101953
10
10
  tinybird/sql_template_fmt.py,sha256=KUHdj5rYCYm_rKKdXYSJAE9vIyXUQLB0YSZnUXHeBlY,10196
11
- tinybird/sql_toolset.py,sha256=19WPr4S3SR--Iw-VPgmDnLmhOZyHhTxnj3-_Yq3OgEU,19767
11
+ tinybird/sql_toolset.py,sha256=Y2_fQrbk5GSNoRncAmRS_snpV61XQbiOy4uYkeF6pr4,19767
12
12
  tinybird/syncasync.py,sha256=IPnOx6lMbf9SNddN1eBtssg8vCLHMt76SuZ6YNYm-Yk,27761
13
13
  tinybird/tornado_template.py,sha256=jjNVDMnkYFWXflmT8KU_Ssbo5vR8KQq3EJMk5vYgXRw,41959
14
14
  tinybird/ch_utils/constants.py,sha256=v5-nkXHUhysu4i9Z4WVv0-sBbh6xSYUH5q5xHSY2xTI,4194
15
15
  tinybird/ch_utils/engine.py,sha256=4X1B-iuhdW_mxKnX_m3iCsxgP9RPVgR75g7yH1vsJ6A,40851
16
- tinybird/datafile/common.py,sha256=euJAKSu6GA67oIcRvrrBGsGI1nZtkSWM45ikjLUlJz0,106049
16
+ tinybird/datafile/common.py,sha256=Cj-CyO6TKa9_31Mao5qQffIDDtoLnKfe93cubGF5S-Y,105670
17
17
  tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1wnI,556
18
18
  tinybird/datafile/parse_connection.py,sha256=tRyn2Rpr1TeWet5BXmMoQgaotbGdYep1qiTak_OqC5E,1825
19
19
  tinybird/datafile/parse_datasource.py,sha256=ssW8QeFSgglVFi3sDZj_HgkJiTJ2069v2JgqnH3CkDE,1825
20
20
  tinybird/datafile/parse_pipe.py,sha256=xf4m0Tw44QWJzHzAm7Z7FwUoUUtr7noMYjU1NiWnX0k,3880
21
- tinybird/tb/__cli__.py,sha256=i0Uj8XdvCB6yYSx3uE3zP-aqoSr6lSMqfDHHiLv2Euw,247
21
+ tinybird/tb/__cli__.py,sha256=mQDawLTa-oQDyZZZYyjnBrWWRtaViQL0ZaN2lmv4e1E,247
22
22
  tinybird/tb/check_pypi.py,sha256=Gp0HkHHDFMSDL6nxKlOY51z7z1Uv-2LRexNTZSHHGmM,552
23
23
  tinybird/tb/cli.py,sha256=FdDFEIayjmsZEVsVSSvRiVYn_FHOVg_zWQzchnzfWho,1008
24
24
  tinybird/tb/client.py,sha256=IQRaInDjOwr9Fzaz3_xXc3aUGqh94tM2lew7IZbB9eM,53733
@@ -46,7 +46,7 @@ tinybird/tb/modules/job.py,sha256=wBsnu8UPTOha2rkLvucgmw4xYv73ubmui3eeSIF68ZM,31
46
46
  tinybird/tb/modules/llm.py,sha256=fPBBCmM3KlCksLlgJkg4joDn6y3H5QjDzE-Pm4YNf7E,1782
47
47
  tinybird/tb/modules/llm_utils.py,sha256=nS9r4FAElJw8yXtmdYrx-rtI2zXR8qXfi1QqUDCfxvg,3469
48
48
  tinybird/tb/modules/local.py,sha256=kW3IHwJPvhBsa1eMh_xzow9Az3yYpHthkzsLSHeP5HE,6512
49
- tinybird/tb/modules/local_common.py,sha256=mFhidxVeGnDA_UHss-bRY8_UzU0V5iZ3HGnVqlnMzY0,17730
49
+ tinybird/tb/modules/local_common.py,sha256=PqNADrHRA5YPRfyDxeX9s8zTOMcSkFaC2R7Q8ie_qoA,17874
50
50
  tinybird/tb/modules/login.py,sha256=zerXZqIv15pbFk5XRt746xGcVnp01YmL_403byBf4jQ,1245
51
51
  tinybird/tb/modules/login_common.py,sha256=CKXD_BjivhGUmBtNbLTJwzQDr6885C72XPZjo0GLLvI,12010
52
52
  tinybird/tb/modules/logout.py,sha256=sniI4JNxpTrVeRCp0oGJuQ3yRerG4hH5uz6oBmjv724,1009
@@ -70,7 +70,7 @@ tinybird/tb/modules/watch.py,sha256=No0bK1M1_3CYuMaIgylxf7vYFJ72lTJe3brz6xQ-mJo,
70
70
  tinybird/tb/modules/workspace.py,sha256=tCP1zZMwBhLRGm22TGfpSd4cHvQLAS1o_azIXv_r6uw,11172
71
71
  tinybird/tb/modules/workspace_members.py,sha256=5JdkJgfuEwbq-t6vxkBhYwgsiTDxF790wsa6Xfif9nk,8608
72
72
  tinybird/tb/modules/agent/__init__.py,sha256=i3oe3vDIWWPaicdCM0zs7D7BJ1W0k7th93ooskHAV00,54
73
- tinybird/tb/modules/agent/agent.py,sha256=aCeZ1mhnd-WTEBHg_82lIpLPOVa6dXJ7uriEpU0N7yM,36100
73
+ tinybird/tb/modules/agent/agent.py,sha256=wxLG84pYfNdQPB1TI6Nkv_8Y_bO5lmOX3ht87gnmrwY,36315
74
74
  tinybird/tb/modules/agent/animations.py,sha256=4WOC5_2BracttmMCrV0H91tXfWcUzQHBUaIJc5FA7tE,3490
75
75
  tinybird/tb/modules/agent/banner.py,sha256=l6cO5Fi7lbVKp-GsBP8jf3IkjOWxg2jpAt9NBCy0WR8,4085
76
76
  tinybird/tb/modules/agent/command_agent.py,sha256=0Z08rQsir59zQAr-kkOvsKIFpIBsBSTGJJ1VgqqF5WA,3654
@@ -81,7 +81,7 @@ tinybird/tb/modules/agent/mock_agent.py,sha256=zbAZfAqdSLUtMr2VqO0erWpzjT2F1tTcu
81
81
  tinybird/tb/modules/agent/models.py,sha256=eokO8XlY-kVJOsbqiVporGUAOCyKAXCO5xgTEK9SM6Y,2208
82
82
  tinybird/tb/modules/agent/prompts.py,sha256=a8ZnOZCTGRnxa_dlrTSmeaM9snOI3sMx0nwUdv7aVGI,44165
83
83
  tinybird/tb/modules/agent/testing_agent.py,sha256=AtwtJViH7805i7djyBgDb7SSUtDyJnw0TWJu6lBFsrg,2953
84
- tinybird/tb/modules/agent/utils.py,sha256=R1RcoPvjKh4OyuwLztWb74t2wBpV7JvNVLQ_JyClveM,31901
84
+ tinybird/tb/modules/agent/utils.py,sha256=alvRNtpPPRZP0sNdOXbzX3uQZHqqeh1daIAg3aquq24,32015
85
85
  tinybird/tb/modules/agent/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
86
86
  tinybird/tb/modules/agent/tools/analyze.py,sha256=CR5LXg4fou-zYEksqnjpJ0icvxJVoKnTctoI1NRvqCM,3873
87
87
  tinybird/tb/modules/agent/tools/append.py,sha256=8UsGMzmv7GYbzp0gerOBqpxxocDbous_haSuwS3zuGU,8222
@@ -96,7 +96,7 @@ tinybird/tb/modules/agent/tools/get_openapi_definition.py,sha256=4TIMO2XzHBMhpt9
96
96
  tinybird/tb/modules/agent/tools/mock.py,sha256=Seo4WcYNLL1-SmPXutoaX94_pfOdIb47JXo8dHtUVhg,7106
97
97
  tinybird/tb/modules/agent/tools/plan.py,sha256=uAJEHZ-xXIq-EpURJYV7GUyY7IbIgactw9NWeCsIT9Y,2516
98
98
  tinybird/tb/modules/agent/tools/request_endpoint.py,sha256=bsLWrMn-ofJM3nn9vm8j_U8fdopVd3H5L0ii6ji-Kuw,4359
99
- tinybird/tb/modules/agent/tools/run_command.py,sha256=ypvIU0j1XVUWghqt-dpWHm3GQIYsZwE7kRHC3Wau_H0,1708
99
+ tinybird/tb/modules/agent/tools/run_command.py,sha256=EOHkyK9nktlt5jVz9sQcSt4CN40LO490FjmAy3CuNmE,1793
100
100
  tinybird/tb/modules/agent/tools/secret.py,sha256=8AGTZgHLPg1bxCA2cPMnb-zNutWEwn4emHo7kLjJC5w,4323
101
101
  tinybird/tb/modules/agent/tools/test.py,sha256=4XuEWVHLOTSO51Z9xJ08dTjk0j3IWY_JlPtSBO5aaUs,10373
102
102
  tinybird/tb/modules/datafile/build.py,sha256=NFKBrusFLU0WJNCXePAFWiEDuTaXpwc0lHlOQWEJ43s,51117
@@ -119,8 +119,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
119
119
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
120
120
  tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
121
121
  tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
122
- tinybird-0.0.1.dev288.dist-info/METADATA,sha256=L0eOct16E7wiMuY7AZ7jIovDUt80Y1A3usyUbL_HN_0,1845
123
- tinybird-0.0.1.dev288.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
124
- tinybird-0.0.1.dev288.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
125
- tinybird-0.0.1.dev288.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
126
- tinybird-0.0.1.dev288.dist-info/RECORD,,
122
+ tinybird-0.0.1.dev289.dist-info/METADATA,sha256=ENjdQSJQH3QgYbGGAJddSYazWCBQ-ZJbpW6SyEqFGKE,1845
123
+ tinybird-0.0.1.dev289.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
124
+ tinybird-0.0.1.dev289.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
125
+ tinybird-0.0.1.dev289.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
126
+ tinybird-0.0.1.dev289.dist-info/RECORD,,