tinybird 0.0.1.dev259__tar.gz → 0.0.1.dev260__tar.gz
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-0.0.1.dev259 → tinybird-0.0.1.dev260}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/agent.py +10 -4
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/prompts.py +11 -1
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/create_datafile.py +56 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/setup.cfg +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/datafile/common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/datafile/parse_connection.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/client.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/__init__.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/animations.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/banner.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/memory.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/models.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/__init__.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/analyze.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/append.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/build.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/deploy.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/deploy_check.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/diff_resource.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/execute_query.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/explore.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/get_endpoint_stats.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/get_openapi_definition.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/mock.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/plan.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/preview_datafile.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/request_endpoint.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/test.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/utils.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/build_common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/connection.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/deployment_common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/login_common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/mock_common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/secret_common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/sink.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/test_common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -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.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev260'
|
|
8
|
+
__revision__ = 'bd0c45e'
|
|
@@ -17,11 +17,11 @@ from tinybird.tb.modules.agent.animations import ThinkingAnimation
|
|
|
17
17
|
from tinybird.tb.modules.agent.banner import display_banner
|
|
18
18
|
from tinybird.tb.modules.agent.memory import clear_history, clear_messages, load_messages, save_messages
|
|
19
19
|
from tinybird.tb.modules.agent.models import create_model, model_costs
|
|
20
|
-
from tinybird.tb.modules.agent.prompts import agent_system_prompt, resources_prompt
|
|
20
|
+
from tinybird.tb.modules.agent.prompts import agent_system_prompt, load_custom_project_rules, resources_prompt
|
|
21
21
|
from tinybird.tb.modules.agent.tools.analyze import analyze_file, analyze_url
|
|
22
22
|
from tinybird.tb.modules.agent.tools.append import append_file, append_url
|
|
23
23
|
from tinybird.tb.modules.agent.tools.build import build
|
|
24
|
-
from tinybird.tb.modules.agent.tools.create_datafile import create_datafile
|
|
24
|
+
from tinybird.tb.modules.agent.tools.create_datafile import create_datafile, rename_datafile_or_fixture
|
|
25
25
|
from tinybird.tb.modules.agent.tools.deploy import deploy
|
|
26
26
|
from tinybird.tb.modules.agent.tools.deploy_check import deploy_check
|
|
27
27
|
from tinybird.tb.modules.agent.tools.diff_resource import diff_resource
|
|
@@ -75,6 +75,12 @@ class TinybirdAgent:
|
|
|
75
75
|
tools=[
|
|
76
76
|
Tool(preview_datafile, docstring_format="google", require_parameter_descriptions=True, takes_ctx=False),
|
|
77
77
|
Tool(create_datafile, docstring_format="google", require_parameter_descriptions=True, takes_ctx=True),
|
|
78
|
+
Tool(
|
|
79
|
+
rename_datafile_or_fixture,
|
|
80
|
+
docstring_format="google",
|
|
81
|
+
require_parameter_descriptions=True,
|
|
82
|
+
takes_ctx=True,
|
|
83
|
+
),
|
|
78
84
|
Tool(plan, docstring_format="google", require_parameter_descriptions=True, takes_ctx=True),
|
|
79
85
|
Tool(build, docstring_format="google", require_parameter_descriptions=True, takes_ctx=True),
|
|
80
86
|
Tool(deploy, docstring_format="google", require_parameter_descriptions=True, takes_ctx=True),
|
|
@@ -170,7 +176,7 @@ class TinybirdAgent:
|
|
|
170
176
|
)
|
|
171
177
|
|
|
172
178
|
def run(self, user_prompt: str, config: dict[str, Any]) -> None:
|
|
173
|
-
user_prompt = f"{user_prompt}\n\n{
|
|
179
|
+
user_prompt = f"{user_prompt}\n\n{load_custom_project_rules(self.project.folder)}"
|
|
174
180
|
self.thinking_animation.start()
|
|
175
181
|
result = self.agent.run_sync(
|
|
176
182
|
user_prompt,
|
|
@@ -185,7 +191,7 @@ class TinybirdAgent:
|
|
|
185
191
|
self._echo_usage(config, result)
|
|
186
192
|
|
|
187
193
|
async def run_iter(self, user_prompt: str, config: dict[str, Any]) -> None:
|
|
188
|
-
user_prompt = f"{user_prompt}\n\n"
|
|
194
|
+
user_prompt = f"{user_prompt}\n\n{load_custom_project_rules(self.project.folder)}"
|
|
189
195
|
self.thinking_animation.start()
|
|
190
196
|
deps = self._build_agent_deps(config)
|
|
191
197
|
|
|
@@ -568,9 +568,10 @@ You have access to the following tools:
|
|
|
568
568
|
13. `request_endpoint` - Request an endpoint against Tinybird Cloud or Local.
|
|
569
569
|
14. `diff_resource` - Diff the content of a resource in Tinybird Cloud vs Tinybird Local vs Project local file.
|
|
570
570
|
15. `create_tests` - Create tests for an endpoint.
|
|
571
|
+
16. `rename_datafile_or_fixture` - Rename a datafile or fixture.
|
|
571
572
|
|
|
572
573
|
# When creating or updating datafiles:
|
|
573
|
-
1. Use `plan` tool to plan the creation or
|
|
574
|
+
1. Use `plan` tool to plan the creation, update or rename of resources.
|
|
574
575
|
2. If the user confirms the plan, go from 3 to 7 steps until all the resources are created, updated or skipped.
|
|
575
576
|
3. Use `preview_datafile` tool to preview the content of a datafile.
|
|
576
577
|
4. Without asking, use the `create_datafile` tool to create the datafile, because it will ask for confirmation before creating the file.
|
|
@@ -674,3 +675,12 @@ GCS: {gcs_connection_example}
|
|
|
674
675
|
# Info
|
|
675
676
|
Today is {datetime.now().strftime("%Y-%m-%d")}
|
|
676
677
|
"""
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
def load_custom_project_rules(folder: str) -> str:
|
|
681
|
+
tinybird_rules = Path(folder).joinpath("TINYBIRD.md")
|
|
682
|
+
|
|
683
|
+
if not tinybird_rules.exists():
|
|
684
|
+
return ""
|
|
685
|
+
|
|
686
|
+
return f"# Custom Project Rulesd defined by the user\n\n{tinybird_rules.read_text()}"
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/create_datafile.py
RENAMED
|
@@ -122,3 +122,59 @@ def create_file(ctx: RunContext[TinybirdAgentContext], path: str, content: str):
|
|
|
122
122
|
f.write(content)
|
|
123
123
|
|
|
124
124
|
return "ok"
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def rename_datafile_or_fixture(ctx: RunContext[TinybirdAgentContext], path: str, new_path: str):
|
|
128
|
+
"""Renames a datafile or fixture.
|
|
129
|
+
|
|
130
|
+
Args:
|
|
131
|
+
path (str): The path to the file to rename. Required.
|
|
132
|
+
new_path (str): The new path to the file. Required.
|
|
133
|
+
"""
|
|
134
|
+
try:
|
|
135
|
+
ctx.deps.thinking_animation.stop()
|
|
136
|
+
confirmation = show_confirmation(
|
|
137
|
+
title=f"Rename '{path}' to '{new_path}'?",
|
|
138
|
+
skip_confirmation=ctx.deps.dangerously_skip_permissions,
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
if confirmation == "review":
|
|
142
|
+
feedback = show_input(ctx.deps.workspace_name)
|
|
143
|
+
ctx.deps.thinking_animation.start()
|
|
144
|
+
return f"User did not confirm the proposed changes and gave the following feedback: {feedback}"
|
|
145
|
+
|
|
146
|
+
click.echo(FeedbackManager.highlight(message=f"» Renaming file {path} to {new_path}..."))
|
|
147
|
+
new_path_full = Path(ctx.deps.folder) / new_path.removeprefix("/")
|
|
148
|
+
|
|
149
|
+
if new_path_full.exists():
|
|
150
|
+
click.echo(FeedbackManager.error(message=f"Error: File {new_path} already exists"))
|
|
151
|
+
ctx.deps.thinking_animation.start()
|
|
152
|
+
return f"Error: File {new_path} already exists"
|
|
153
|
+
|
|
154
|
+
parent_path = new_path_full.parent
|
|
155
|
+
parent_path.mkdir(parents=True, exist_ok=True)
|
|
156
|
+
os.rename(Path(ctx.deps.folder) / path.removeprefix("/"), new_path_full)
|
|
157
|
+
is_datafile = (".connection", ".datasource", ".pipe")
|
|
158
|
+
|
|
159
|
+
if new_path_full.suffix in is_datafile:
|
|
160
|
+
ctx.deps.build_project(test=False, silent=True)
|
|
161
|
+
|
|
162
|
+
click.echo(FeedbackManager.success(message=f"✓ {new_path} created"))
|
|
163
|
+
ctx.deps.thinking_animation.start()
|
|
164
|
+
return f"Renamed file from {path} to {new_path}"
|
|
165
|
+
except AgentRunCancelled as e:
|
|
166
|
+
raise e
|
|
167
|
+
except FileNotFoundError:
|
|
168
|
+
ctx.deps.thinking_animation.start()
|
|
169
|
+
click.echo(FeedbackManager.error(message=f"Error: File {path} not found"))
|
|
170
|
+
return f"Error: File {path} not found (double check the file path)"
|
|
171
|
+
except CLIBuildException as e:
|
|
172
|
+
ctx.deps.thinking_animation.stop()
|
|
173
|
+
click.echo(FeedbackManager.error(message=e))
|
|
174
|
+
ctx.deps.thinking_animation.start()
|
|
175
|
+
return f"Error building project: {e}"
|
|
176
|
+
except Exception as e:
|
|
177
|
+
ctx.deps.thinking_animation.stop()
|
|
178
|
+
click.echo(FeedbackManager.error(message=e))
|
|
179
|
+
ctx.deps.thinking_animation.start()
|
|
180
|
+
return f"Error renaming {path} to {new_path}: {e}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/deploy_check.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/diff_resource.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/execute_query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/preview_datafile.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/agent/tools/request_endpoint.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/datafile/pipe_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb/modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev259 → tinybird-0.0.1.dev260}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|