tinybird 0.0.1.dev266__py3-none-any.whl → 0.0.1.dev268__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.
- tinybird/tb/__cli__.py +2 -2
- tinybird/tb/modules/agent/agent.py +70 -55
- tinybird/tb/modules/agent/banner.py +8 -25
- tinybird/tb/modules/agent/command_agent.py +8 -1
- tinybird/tb/modules/agent/compactor.py +311 -0
- tinybird/tb/modules/agent/explore_agent.py +86 -0
- tinybird/tb/modules/agent/memory.py +11 -1
- tinybird/tb/modules/agent/prompts.py +51 -36
- tinybird/tb/modules/agent/testing_agent.py +8 -1
- tinybird/tb/modules/agent/tools/append.py +16 -6
- tinybird/tb/modules/agent/tools/create_datafile.py +17 -4
- tinybird/tb/modules/agent/tools/execute_query.py +138 -11
- tinybird/tb/modules/agent/tools/mock.py +30 -22
- tinybird/tb/modules/agent/tools/request_endpoint.py +16 -3
- tinybird/tb/modules/agent/tools/run_command.py +3 -1
- tinybird/tb/modules/agent/utils.py +42 -0
- tinybird/tb/modules/cli.py +5 -9
- tinybird/tb/modules/deployment_common.py +4 -1
- {tinybird-0.0.1.dev266.dist-info → tinybird-0.0.1.dev268.dist-info}/METADATA +2 -1
- {tinybird-0.0.1.dev266.dist-info → tinybird-0.0.1.dev268.dist-info}/RECORD +23 -23
- tinybird/tb/modules/agent/tools/explore.py +0 -15
- tinybird/tb/modules/agent/tools/preview_datafile.py +0 -24
- {tinybird-0.0.1.dev266.dist-info → tinybird-0.0.1.dev268.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev266.dist-info → tinybird-0.0.1.dev268.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev266.dist-info → tinybird-0.0.1.dev268.dist-info}/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ import click
|
|
|
4
4
|
import humanfriendly
|
|
5
5
|
from pydantic_ai import RunContext
|
|
6
6
|
|
|
7
|
-
from tinybird.tb.modules.agent.utils import TinybirdAgentContext
|
|
7
|
+
from tinybird.tb.modules.agent.utils import TinybirdAgentContext, limit_result_output
|
|
8
8
|
from tinybird.tb.modules.common import echo_safe_humanfriendly_tables_format_pretty_table
|
|
9
9
|
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
10
10
|
|
|
@@ -37,6 +37,10 @@ def request_endpoint(
|
|
|
37
37
|
|
|
38
38
|
request_endpoint = ctx.deps.request_endpoint_cloud if cloud else ctx.deps.request_endpoint_local
|
|
39
39
|
result = request_endpoint(endpoint_name=endpoint_name, params=params)
|
|
40
|
+
|
|
41
|
+
# Apply output limiting using the utility function
|
|
42
|
+
result, truncated_columns = limit_result_output(result)
|
|
43
|
+
|
|
40
44
|
stats = result["statistics"]
|
|
41
45
|
seconds = stats["elapsed"]
|
|
42
46
|
rows_read = humanfriendly.format_number(stats["rows_read"])
|
|
@@ -49,11 +53,20 @@ def request_endpoint(
|
|
|
49
53
|
click.echo(FeedbackManager.info_no_rows())
|
|
50
54
|
else:
|
|
51
55
|
echo_safe_humanfriendly_tables_format_pretty_table(
|
|
52
|
-
data=[d.values() for d in result["data"]
|
|
56
|
+
data=[d.values() for d in result["data"]], column_names=result["data"][0].keys()
|
|
53
57
|
)
|
|
54
58
|
click.echo("Showing first 10 results\n")
|
|
59
|
+
|
|
60
|
+
# Prepare return message with truncation info
|
|
61
|
+
truncation_info = ""
|
|
62
|
+
if truncated_columns:
|
|
63
|
+
truncated_list = ", ".join(sorted(truncated_columns))
|
|
64
|
+
truncation_info = (
|
|
65
|
+
f" Note: The following columns had values truncated due to length > 200 characters: {truncated_list}."
|
|
66
|
+
)
|
|
67
|
+
|
|
55
68
|
ctx.deps.thinking_animation.start()
|
|
56
|
-
return f"Result for endpoint {endpoint_name} with params {params} in {cloud_or_local} environment: {result}. Do not show result is already shown in the console."
|
|
69
|
+
return f"Result for endpoint {endpoint_name} with params {params} in {cloud_or_local} environment: {result}. Do not show result is already shown in the console.{truncation_info}"
|
|
57
70
|
except Exception as e:
|
|
58
71
|
error = str(e)
|
|
59
72
|
ctx.deps.thinking_animation.stop()
|
|
@@ -15,8 +15,10 @@ def run_command(ctx: RunContext[TinybirdAgentContext], command: str):
|
|
|
15
15
|
"""
|
|
16
16
|
try:
|
|
17
17
|
ctx.deps.thinking_animation.stop()
|
|
18
|
+
is_deploy = " deploy " in command.lower()
|
|
18
19
|
confirmation = show_confirmation(
|
|
19
|
-
title=f"Run command: {command}?",
|
|
20
|
+
title=f"Run command: {command}?",
|
|
21
|
+
skip_confirmation=ctx.deps.dangerously_skip_permissions and not is_deploy,
|
|
20
22
|
)
|
|
21
23
|
|
|
22
24
|
if confirmation == "review":
|
|
@@ -36,6 +36,7 @@ except ImportError:
|
|
|
36
36
|
|
|
37
37
|
class TinybirdAgentContext(BaseModel):
|
|
38
38
|
folder: str
|
|
39
|
+
workspace_id: str
|
|
39
40
|
workspace_name: str
|
|
40
41
|
thinking_animation: Any
|
|
41
42
|
get_project_files: Callable[[], List[str]]
|
|
@@ -66,6 +67,7 @@ class TinybirdAgentContext(BaseModel):
|
|
|
66
67
|
host: str
|
|
67
68
|
local_host: str
|
|
68
69
|
local_token: str
|
|
70
|
+
run_id: Optional[str] = None
|
|
69
71
|
|
|
70
72
|
|
|
71
73
|
default_style = PromptStyle.from_dict(
|
|
@@ -792,3 +794,43 @@ def _is_path_inside_project(file_path: Path, project_path: Path) -> bool:
|
|
|
792
794
|
return True
|
|
793
795
|
except ValueError:
|
|
794
796
|
return False
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
def limit_result_output(
|
|
800
|
+
result: dict[str, Any], max_rows: int = 10, max_column_length: int = 200
|
|
801
|
+
) -> tuple[dict[str, Any], set[str]]:
|
|
802
|
+
"""
|
|
803
|
+
Limit result output by truncating column values and limiting number of rows.
|
|
804
|
+
Modifies the result dict in place and returns truncation info.
|
|
805
|
+
|
|
806
|
+
Args:
|
|
807
|
+
result: Result dictionary containing 'data' key with list of row dictionaries
|
|
808
|
+
max_rows: Maximum number of rows to return
|
|
809
|
+
max_column_length: Maximum length for column values before truncation
|
|
810
|
+
|
|
811
|
+
Returns:
|
|
812
|
+
Tuple of (modified_result, truncated_columns_set)
|
|
813
|
+
"""
|
|
814
|
+
truncated_columns: set[str] = set()
|
|
815
|
+
|
|
816
|
+
# Handle case where data doesn't exist or is empty
|
|
817
|
+
if not result.get("data"):
|
|
818
|
+
return result, truncated_columns
|
|
819
|
+
|
|
820
|
+
result_data = result["data"]
|
|
821
|
+
|
|
822
|
+
# Limit to max_rows
|
|
823
|
+
limited_data = result_data[:max_rows]
|
|
824
|
+
|
|
825
|
+
# Truncate column values and track which columns were truncated
|
|
826
|
+
for row in limited_data:
|
|
827
|
+
for column, value in row.items():
|
|
828
|
+
value_str = str(value)
|
|
829
|
+
if len(value_str) > max_column_length:
|
|
830
|
+
row[column] = value_str[:max_column_length] + "..."
|
|
831
|
+
truncated_columns.add(column)
|
|
832
|
+
|
|
833
|
+
# Update the result dict with limited data
|
|
834
|
+
result["data"] = limited_data
|
|
835
|
+
|
|
836
|
+
return result, truncated_columns
|
tinybird/tb/modules/cli.py
CHANGED
|
@@ -47,8 +47,6 @@ DEFAULT_PATTERNS: List[Tuple[str, Union[str, Callable[[str], str]]]] = [
|
|
|
47
47
|
]
|
|
48
48
|
VERSION = f"{__cli__.__version__} (rev {__cli__.__revision__})"
|
|
49
49
|
|
|
50
|
-
agent_mode_flag = os.environ.get("TB_AGENT_MODE", "false") == "true"
|
|
51
|
-
|
|
52
50
|
|
|
53
51
|
@click.group(
|
|
54
52
|
cls=CatchAuthExceptions,
|
|
@@ -56,7 +54,7 @@ agent_mode_flag = os.environ.get("TB_AGENT_MODE", "false") == "true"
|
|
|
56
54
|
"help_option_names": ["-h", "--help"],
|
|
57
55
|
"max_content_width": shutil.get_terminal_size().columns - 10,
|
|
58
56
|
},
|
|
59
|
-
invoke_without_command=
|
|
57
|
+
invoke_without_command=True,
|
|
60
58
|
)
|
|
61
59
|
@click.option(
|
|
62
60
|
"--debug/--no-debug",
|
|
@@ -83,14 +81,12 @@ agent_mode_flag = os.environ.get("TB_AGENT_MODE", "false") == "true"
|
|
|
83
81
|
"--dangerously-skip-permissions",
|
|
84
82
|
is_flag=True,
|
|
85
83
|
default=False,
|
|
86
|
-
help="Skip permissions check in
|
|
87
|
-
hidden=True,
|
|
84
|
+
help="Skip permissions check in Tinybird Code.",
|
|
88
85
|
)
|
|
89
86
|
@click.option(
|
|
90
87
|
"--prompt",
|
|
91
88
|
"-p",
|
|
92
|
-
help="Run
|
|
93
|
-
hidden=True,
|
|
89
|
+
help="Run Tinybird Code in prompt mode with the provided input and exit.",
|
|
94
90
|
)
|
|
95
91
|
@click.version_option(version=VERSION)
|
|
96
92
|
@click.pass_context
|
|
@@ -110,7 +106,7 @@ def cli(
|
|
|
110
106
|
prompt: Optional[str] = None,
|
|
111
107
|
) -> None:
|
|
112
108
|
"""
|
|
113
|
-
Use
|
|
109
|
+
Use Tinybird Code to interact with your project.
|
|
114
110
|
"""
|
|
115
111
|
|
|
116
112
|
# We need to unpatch for our tests not to break
|
|
@@ -208,7 +204,7 @@ def cli(
|
|
|
208
204
|
ctx.ensure_object(dict)["env"] = get_target_env(cloud)
|
|
209
205
|
ctx.ensure_object(dict)["output"] = output
|
|
210
206
|
|
|
211
|
-
is_agent_mode =
|
|
207
|
+
is_agent_mode = ctx.invoked_subcommand is None
|
|
212
208
|
is_prompt_mode = prompt is not None
|
|
213
209
|
|
|
214
210
|
if is_agent_mode or is_prompt_mode:
|
|
@@ -254,9 +254,12 @@ def create_deployment(
|
|
|
254
254
|
elif verbose and f.get("level", "").upper() == "INFO":
|
|
255
255
|
feedback_func = FeedbackManager.info
|
|
256
256
|
feedback_icon = ""
|
|
257
|
+
else:
|
|
258
|
+
feedback_func = None
|
|
257
259
|
resource = f.get("resource")
|
|
258
260
|
resource_bit = f"{resource}: " if resource else ""
|
|
259
|
-
|
|
261
|
+
if feedback_func is not None:
|
|
262
|
+
click.echo(feedback_func(message=f"{feedback_icon}{f.get('level')}: {resource_bit}{f.get('message')}"))
|
|
260
263
|
|
|
261
264
|
deploy_errors = deployment.get("errors")
|
|
262
265
|
for deploy_error in deploy_errors:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: tinybird
|
|
3
|
-
Version: 0.0.1.
|
|
3
|
+
Version: 0.0.1.dev268
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/forward/commands
|
|
6
6
|
Author: Tinybird
|
|
@@ -19,6 +19,7 @@ Requires-Dist: croniter==1.3.15
|
|
|
19
19
|
Requires-Dist: docker==7.1.0
|
|
20
20
|
Requires-Dist: GitPython~=3.1.32
|
|
21
21
|
Requires-Dist: humanfriendly~=8.2
|
|
22
|
+
Requires-Dist: plotext==5.3.2
|
|
22
23
|
Requires-Dist: prompt_toolkit==3.0.48
|
|
23
24
|
Requires-Dist: pydantic~=2.11.7
|
|
24
25
|
Requires-Dist: pydantic-ai-slim[anthropic]~=0.4.2
|
|
@@ -17,7 +17,7 @@ tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1w
|
|
|
17
17
|
tinybird/datafile/parse_connection.py,sha256=tRyn2Rpr1TeWet5BXmMoQgaotbGdYep1qiTak_OqC5E,1825
|
|
18
18
|
tinybird/datafile/parse_datasource.py,sha256=ssW8QeFSgglVFi3sDZj_HgkJiTJ2069v2JgqnH3CkDE,1825
|
|
19
19
|
tinybird/datafile/parse_pipe.py,sha256=xf4m0Tw44QWJzHzAm7Z7FwUoUUtr7noMYjU1NiWnX0k,3880
|
|
20
|
-
tinybird/tb/__cli__.py,sha256=
|
|
20
|
+
tinybird/tb/__cli__.py,sha256=KKPRrlnrFa8peOn4wb4SQ1L-meHflOhqV9E5FVXaots,247
|
|
21
21
|
tinybird/tb/check_pypi.py,sha256=Gp0HkHHDFMSDL6nxKlOY51z7z1Uv-2LRexNTZSHHGmM,552
|
|
22
22
|
tinybird/tb/cli.py,sha256=FdDFEIayjmsZEVsVSSvRiVYn_FHOVg_zWQzchnzfWho,1008
|
|
23
23
|
tinybird/tb/client.py,sha256=OVNlCXI16kpD-Ph8BDhkyKbR68TdZcR_j4ng91Iiybg,54706
|
|
@@ -25,7 +25,7 @@ tinybird/tb/config.py,sha256=mhMTGnMB5KcxGoh3dewIr2Jjsa6pHE183gCPAQWyp6o,3973
|
|
|
25
25
|
tinybird/tb/modules/build.py,sha256=efD-vamK1NPaDo9R86Hn8be2DYoW0Hh5bZiH7knK5dk,7790
|
|
26
26
|
tinybird/tb/modules/build_common.py,sha256=dthlaDn_CuwZnedQcUi7iIdDoHWfSbbbGQwiDgNcmC0,13062
|
|
27
27
|
tinybird/tb/modules/cicd.py,sha256=0KLKccha9IP749QvlXBmzdWv1On3mFwMY4DUcJlBxiE,7326
|
|
28
|
-
tinybird/tb/modules/cli.py,sha256=
|
|
28
|
+
tinybird/tb/modules/cli.py,sha256=OC4jqGciUAgPQLgmo4ztjiQTOiGzqX3yILfxjbZ-CIs,16686
|
|
29
29
|
tinybird/tb/modules/common.py,sha256=tj6DR2yOqMMQ0PILwFGXmMogxdrbQCgj36HdSM611rs,82657
|
|
30
30
|
tinybird/tb/modules/config.py,sha256=gK7rgaWTDd4ZKCrNEg_Uemr26EQjqWt6TjyQKujxOws,11462
|
|
31
31
|
tinybird/tb/modules/connection.py,sha256=-MY56NUAai6EMC4-wpi7bT0_nz_SA8QzTmHkV7HB1IQ,17810
|
|
@@ -33,7 +33,7 @@ tinybird/tb/modules/copy.py,sha256=dPZkcIDvxjJrlQUIvToO0vsEEEs4EYumbNV77-BzNoU,4
|
|
|
33
33
|
tinybird/tb/modules/create.py,sha256=pJxHXG69c9Z_21s-7VuJ3RZOF_nJU51LEwiAkvI3dZY,23251
|
|
34
34
|
tinybird/tb/modules/datasource.py,sha256=pae-ENeHYIF1HHYRSOziFC-2FPLUFa0KS60YpdlKCS8,41725
|
|
35
35
|
tinybird/tb/modules/deployment.py,sha256=EDEVOqFk5fp0fvvs2jV0mT5POFd-i_8uZIUREwzAbEk,13199
|
|
36
|
-
tinybird/tb/modules/deployment_common.py,sha256=
|
|
36
|
+
tinybird/tb/modules/deployment_common.py,sha256=6Ws3YTtEyVl9Id7gyxXkEhe0GJpUJeibS-XGTtTA9DI,19076
|
|
37
37
|
tinybird/tb/modules/deprecations.py,sha256=rrszC1f_JJeJ8mUxGoCxckQTJFBCR8wREf4XXXN-PRc,4507
|
|
38
38
|
tinybird/tb/modules/dev_server.py,sha256=57FCKuWpErwYUYgHspYDkLWEm9F4pbvVOtMrFXX1fVU,10129
|
|
39
39
|
tinybird/tb/modules/endpoint.py,sha256=ksRj6mfDb9Xv63PhTkV_uKSosgysHElqagg3RTt21Do,11958
|
|
@@ -69,32 +69,32 @@ tinybird/tb/modules/watch.py,sha256=No0bK1M1_3CYuMaIgylxf7vYFJ72lTJe3brz6xQ-mJo,
|
|
|
69
69
|
tinybird/tb/modules/workspace.py,sha256=Q_8HcxMsNg8QG9aBlwcWS2umrDP5IkTIHqqz3sfmGuc,11341
|
|
70
70
|
tinybird/tb/modules/workspace_members.py,sha256=5JdkJgfuEwbq-t6vxkBhYwgsiTDxF790wsa6Xfif9nk,8608
|
|
71
71
|
tinybird/tb/modules/agent/__init__.py,sha256=i3oe3vDIWWPaicdCM0zs7D7BJ1W0k7th93ooskHAV00,54
|
|
72
|
-
tinybird/tb/modules/agent/agent.py,sha256=
|
|
72
|
+
tinybird/tb/modules/agent/agent.py,sha256=hxxO8-JN655W252lgUaY4nJ8yv_SOAoAFRmD8F4fV24,29291
|
|
73
73
|
tinybird/tb/modules/agent/animations.py,sha256=4WOC5_2BracttmMCrV0H91tXfWcUzQHBUaIJc5FA7tE,3490
|
|
74
|
-
tinybird/tb/modules/agent/banner.py,sha256=
|
|
75
|
-
tinybird/tb/modules/agent/command_agent.py,sha256=
|
|
76
|
-
tinybird/tb/modules/agent/
|
|
74
|
+
tinybird/tb/modules/agent/banner.py,sha256=l6cO5Fi7lbVKp-GsBP8jf3IkjOWxg2jpAt9NBCy0WR8,4085
|
|
75
|
+
tinybird/tb/modules/agent/command_agent.py,sha256=NTzgb9qnuG-gDpk87VijKs1UUMukJPaJI5UiZtRWUoQ,2864
|
|
76
|
+
tinybird/tb/modules/agent/compactor.py,sha256=BK5AxZFhrp3xWnsRnYaleiYoIWtVNc-_m650Hsopt8g,13841
|
|
77
|
+
tinybird/tb/modules/agent/explore_agent.py,sha256=HkzKmggfSMz7S3RSeKnZXufq-z_U0tTQJpF7JfNIaGQ,3504
|
|
78
|
+
tinybird/tb/modules/agent/memory.py,sha256=vBewB_64L_wHoT4tLT6UX2uxcHwSY880QZ26F9rPqXs,3793
|
|
77
79
|
tinybird/tb/modules/agent/models.py,sha256=IAxqlnHy8c2OeSnDrrSp2Mg38W9_r0GsDM87Wv-YNfM,925
|
|
78
|
-
tinybird/tb/modules/agent/prompts.py,sha256=
|
|
79
|
-
tinybird/tb/modules/agent/testing_agent.py,sha256=
|
|
80
|
-
tinybird/tb/modules/agent/utils.py,sha256=
|
|
80
|
+
tinybird/tb/modules/agent/prompts.py,sha256=oSc_lbwyHh7xJDTBaaykf9YdXpXCidyN3dmDGUJYP9M,31834
|
|
81
|
+
tinybird/tb/modules/agent/testing_agent.py,sha256=mjR9OJ_KzGnjCnjRxp5-sf01LSDkO4-QqknTbkZ-R-Q,2752
|
|
82
|
+
tinybird/tb/modules/agent/utils.py,sha256=IEAZ2HJHAw2Yzna_IZcJp5ljCqwug0zZHoc0vi8vJzE,31001
|
|
81
83
|
tinybird/tb/modules/agent/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
84
|
tinybird/tb/modules/agent/tools/analyze.py,sha256=CR5LXg4fou-zYEksqnjpJ0icvxJVoKnTctoI1NRvqCM,3873
|
|
83
|
-
tinybird/tb/modules/agent/tools/append.py,sha256=
|
|
85
|
+
tinybird/tb/modules/agent/tools/append.py,sha256=xZVNkES0-qGjUrOfMLTn3kZ8JBm2OSMfLk_IZwUTRUo,6558
|
|
84
86
|
tinybird/tb/modules/agent/tools/build.py,sha256=Hm-xDAP9ckMiKquT-DmDg5H0yxZefLOaWKANyoVSaEQ,846
|
|
85
|
-
tinybird/tb/modules/agent/tools/create_datafile.py,sha256=
|
|
87
|
+
tinybird/tb/modules/agent/tools/create_datafile.py,sha256=ne5KezxhvreXuXTB569omjnE5soQyZaFlv9L17DWqXU,7725
|
|
86
88
|
tinybird/tb/modules/agent/tools/deploy.py,sha256=2hKj6LMYiDea6ventsBjE6ArECGIryTdo3X-LYo5oZI,1248
|
|
87
89
|
tinybird/tb/modules/agent/tools/deploy_check.py,sha256=2Wr9hQfKPlhqhumOv5TNl_xFctvdq_DHZ2dI2h_LggY,1048
|
|
88
90
|
tinybird/tb/modules/agent/tools/diff_resource.py,sha256=_9xHcDzCTKk_E1wKQbuktVqV6U9sA0kqYaBxWvtliX0,2613
|
|
89
|
-
tinybird/tb/modules/agent/tools/execute_query.py,sha256=
|
|
90
|
-
tinybird/tb/modules/agent/tools/explore.py,sha256=ihALc_kBcsjrKT3hZyicqyIowB0g_K3AtNNi-5uz9-8,412
|
|
91
|
+
tinybird/tb/modules/agent/tools/execute_query.py,sha256=68XVem-acU3pe8PaqljpQKoRvd1Vle0z51mKX3g2HgQ,8171
|
|
91
92
|
tinybird/tb/modules/agent/tools/get_endpoint_stats.py,sha256=LiEK6ToyPDW2aI8ijclzuwdYAcFmwH-TyjqdFEzQWAc,1689
|
|
92
93
|
tinybird/tb/modules/agent/tools/get_openapi_definition.py,sha256=mjIVVXtgvTs5LzOR8Bp4jB1XhLVMysHrHXawkErFdt8,2282
|
|
93
|
-
tinybird/tb/modules/agent/tools/mock.py,sha256=
|
|
94
|
+
tinybird/tb/modules/agent/tools/mock.py,sha256=RvdsKIr0vKEs91GuK5vKg0fDj8SI-cdcX4XqgvnSwuQ,4508
|
|
94
95
|
tinybird/tb/modules/agent/tools/plan.py,sha256=2KHLNkr2f1RfkbAR4mCVsv94LGosXd8-ky7v6BB1OtQ,985
|
|
95
|
-
tinybird/tb/modules/agent/tools/
|
|
96
|
-
tinybird/tb/modules/agent/tools/
|
|
97
|
-
tinybird/tb/modules/agent/tools/run_command.py,sha256=321w5dYOnapMf-TFIkgizErllwB5Poc0RYOjBAQeMPc,1576
|
|
96
|
+
tinybird/tb/modules/agent/tools/request_endpoint.py,sha256=fK8qeCVWQvSbqVyuE71Yvm5-EFTvsDYADpKHmwblbUI,3356
|
|
97
|
+
tinybird/tb/modules/agent/tools/run_command.py,sha256=XjPDTTzkba9GOQBDiSTwddluyXkguVhxvXnRaC8m-Zc,1657
|
|
98
98
|
tinybird/tb/modules/agent/tools/test.py,sha256=CbGak_coopCTtqHoPWy-BwgLMIyEyeO34NTNkv18au4,6041
|
|
99
99
|
tinybird/tb/modules/datafile/build.py,sha256=NFKBrusFLU0WJNCXePAFWiEDuTaXpwc0lHlOQWEJ43s,51117
|
|
100
100
|
tinybird/tb/modules/datafile/build_common.py,sha256=2yNdxe49IMA9wNvl25NemY2Iaz8L66snjOdT64dm1is,4511
|
|
@@ -116,8 +116,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
|
|
|
116
116
|
tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
|
|
117
117
|
tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
118
118
|
tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
|
|
119
|
-
tinybird-0.0.1.
|
|
120
|
-
tinybird-0.0.1.
|
|
121
|
-
tinybird-0.0.1.
|
|
122
|
-
tinybird-0.0.1.
|
|
123
|
-
tinybird-0.0.1.
|
|
119
|
+
tinybird-0.0.1.dev268.dist-info/METADATA,sha256=OgmwmoSXp1tt4vYgVSTmtzVfdXA4ewbK7q_C6hz2jo4,1763
|
|
120
|
+
tinybird-0.0.1.dev268.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
121
|
+
tinybird-0.0.1.dev268.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
122
|
+
tinybird-0.0.1.dev268.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
|
|
123
|
+
tinybird-0.0.1.dev268.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
from pydantic_ai import RunContext
|
|
2
|
-
|
|
3
|
-
from tinybird.tb.modules.agent.utils import TinybirdAgentContext
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def explore_data(ctx: RunContext[TinybirdAgentContext], prompt: str):
|
|
7
|
-
"""Explore production data in the current workspace
|
|
8
|
-
|
|
9
|
-
Args:
|
|
10
|
-
prompt (str): The prompt to explore data with. Required.
|
|
11
|
-
|
|
12
|
-
Returns:
|
|
13
|
-
str: The result of the exploration.
|
|
14
|
-
"""
|
|
15
|
-
return ctx.deps.explore_data(prompt)
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
from tinybird.tb.modules.agent.utils import Datafile
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def preview_datafile(name: str, type: str, description: str, content: str, pathname: str) -> Datafile:
|
|
5
|
-
"""Preview the content of a datafile before creating it
|
|
6
|
-
|
|
7
|
-
Args:
|
|
8
|
-
name (str): The name of the datafile. Required.
|
|
9
|
-
type (str): The type of the datafile. Options: datasource, endpoint, materialized, sink, copy, connection. Required.
|
|
10
|
-
description (str): The description of the datafile. Required.
|
|
11
|
-
content (str): The content of the datafile. Required.
|
|
12
|
-
pathname (str): The pathname of the datafile where the file will be created. Required.
|
|
13
|
-
|
|
14
|
-
Returns:
|
|
15
|
-
Datafile: The datafile preview.
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
return Datafile(
|
|
19
|
-
type=type.lower(),
|
|
20
|
-
name=name,
|
|
21
|
-
content=content,
|
|
22
|
-
description=description,
|
|
23
|
-
pathname=pathname,
|
|
24
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|