tinybird 0.0.1.dev291__tar.gz → 0.0.1.dev292__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.dev291 → tinybird-0.0.1.dev292}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/context.py +3 -2
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/agent.py +10 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/explore_agent.py +5 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/mock_agent.py +5 -1
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/prompts.py +49 -2
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/run_command.py +9 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/setup.cfg +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/datafile/common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/datafile/parse_connection.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/service_datasources.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/client.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/__init__.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/animations.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/banner.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/command_agent.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/compactor.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/file_agent.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/memory.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/models.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/testing_agent.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/__init__.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/analyze.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/append.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/build.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/datafile.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/deploy.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/deploy_check.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/diff_resource.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/execute_query.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/file.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/get_endpoint_stats.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/get_openapi_definition.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/mock.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/plan.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/request_endpoint.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/secret.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/test.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/utils.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/build_common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/connection.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/deployment_common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/login_common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/mock_common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/secret_common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/sink.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/test_common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -3,10 +3,11 @@ from typing import TYPE_CHECKING
|
|
|
3
3
|
|
|
4
4
|
# Avoid circular import error
|
|
5
5
|
if TYPE_CHECKING:
|
|
6
|
-
from
|
|
6
|
+
from hfi.hfi_workspace_data import HfiWorkspaceData
|
|
7
|
+
|
|
7
8
|
|
|
8
9
|
workspace_id: ContextVar[str] = ContextVar("workspace_id")
|
|
9
|
-
|
|
10
|
+
hfi_workspace_data: ContextVar["HfiWorkspaceData"] = ContextVar("hfi_workspace_data")
|
|
10
11
|
table_id: ContextVar[str] = ContextVar("table_id")
|
|
11
12
|
hfi_frequency: ContextVar[float] = ContextVar("hfi_frequency")
|
|
12
13
|
hfi_frequency_gatherer: ContextVar[float] = ContextVar("hfi_frequency_gatherer")
|
|
@@ -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.dev292'
|
|
8
|
+
__revision__ = '78dba1d'
|
|
@@ -34,10 +34,12 @@ from tinybird.tb.modules.agent.mock_agent import MockAgent
|
|
|
34
34
|
from tinybird.tb.modules.agent.models import create_model
|
|
35
35
|
from tinybird.tb.modules.agent.prompts import (
|
|
36
36
|
agent_system_prompt,
|
|
37
|
+
fixtures_prompt,
|
|
37
38
|
load_custom_project_rules,
|
|
38
39
|
resources_prompt,
|
|
39
40
|
secrets_prompt,
|
|
40
41
|
service_datasources_prompt,
|
|
42
|
+
vendor_files_prompt,
|
|
41
43
|
)
|
|
42
44
|
from tinybird.tb.modules.agent.testing_agent import TestingAgent
|
|
43
45
|
from tinybird.tb.modules.agent.tools.analyze import analyze_file, analyze_url
|
|
@@ -322,6 +324,14 @@ class TinybirdAgent:
|
|
|
322
324
|
def get_project_files(ctx: RunContext[TinybirdAgentContext]) -> str:
|
|
323
325
|
return resources_prompt(self.project)
|
|
324
326
|
|
|
327
|
+
@self.agent.instructions
|
|
328
|
+
def get_vendor_files(ctx: RunContext[TinybirdAgentContext]) -> str:
|
|
329
|
+
return vendor_files_prompt(self.project)
|
|
330
|
+
|
|
331
|
+
@self.agent.instructions
|
|
332
|
+
def get_fixture_files(ctx: RunContext[TinybirdAgentContext]) -> str:
|
|
333
|
+
return fixtures_prompt(self.project)
|
|
334
|
+
|
|
325
335
|
@self.agent.instructions
|
|
326
336
|
def get_service_datasources(ctx: RunContext[TinybirdAgentContext]) -> str:
|
|
327
337
|
return service_datasources_prompt()
|
|
@@ -12,6 +12,7 @@ from tinybird.tb.modules.agent.prompts import (
|
|
|
12
12
|
resources_prompt,
|
|
13
13
|
service_datasources_prompt,
|
|
14
14
|
tone_and_style_instructions,
|
|
15
|
+
vendor_files_prompt,
|
|
15
16
|
)
|
|
16
17
|
from tinybird.tb.modules.agent.tools.diff_resource import diff_resource
|
|
17
18
|
from tinybird.tb.modules.agent.tools.execute_query import execute_query
|
|
@@ -76,6 +77,10 @@ Once you finish the task, return a valid response for the task to complete.
|
|
|
76
77
|
def get_project_files(ctx: RunContext[TinybirdAgentContext]) -> str:
|
|
77
78
|
return resources_prompt(self.project)
|
|
78
79
|
|
|
80
|
+
@self.agent.instructions
|
|
81
|
+
def get_vendor_files(ctx: RunContext[TinybirdAgentContext]) -> str:
|
|
82
|
+
return vendor_files_prompt(self.project)
|
|
83
|
+
|
|
79
84
|
@self.agent.instructions
|
|
80
85
|
def get_service_datasources(ctx: RunContext[TinybirdAgentContext]) -> str:
|
|
81
86
|
return service_datasources_prompt()
|
|
@@ -6,7 +6,7 @@ from pydantic_ai.usage import Usage
|
|
|
6
6
|
|
|
7
7
|
from tinybird.tb.modules.agent.animations import ThinkingAnimation
|
|
8
8
|
from tinybird.tb.modules.agent.models import create_model
|
|
9
|
-
from tinybird.tb.modules.agent.prompts import resources_prompt
|
|
9
|
+
from tinybird.tb.modules.agent.prompts import fixtures_prompt, resources_prompt
|
|
10
10
|
from tinybird.tb.modules.agent.tools.mock import generate_mock_fixture
|
|
11
11
|
from tinybird.tb.modules.agent.utils import TinybirdAgentContext
|
|
12
12
|
from tinybird.tb.modules.project import Project
|
|
@@ -194,6 +194,10 @@ Today is {datetime.now().strftime("%Y-%m-%d")}
|
|
|
194
194
|
def get_project_files(ctx: RunContext[TinybirdAgentContext]) -> str:
|
|
195
195
|
return resources_prompt(self.project)
|
|
196
196
|
|
|
197
|
+
@self.agent.instructions
|
|
198
|
+
def get_fixture_files(ctx: RunContext[TinybirdAgentContext]) -> str:
|
|
199
|
+
return fixtures_prompt(self.project)
|
|
200
|
+
|
|
197
201
|
def run(self, task: str, deps: TinybirdAgentContext, usage: Usage):
|
|
198
202
|
result = self.agent.run_sync(
|
|
199
203
|
task,
|
|
@@ -35,8 +35,10 @@ available_commands = [
|
|
|
35
35
|
"`tb sink ls`: List all sinks",
|
|
36
36
|
"`tb workspace current`: Show the current workspace",
|
|
37
37
|
"`tb workspace clear --yes`: Delete all resources in the workspace (Only available in Tinybird Local)",
|
|
38
|
+
"`tb workspace ls`: List all workspaces",
|
|
38
39
|
"`tb local start --skip-new-version`: Start Tinybird Local container in non-interactive mode",
|
|
39
40
|
"`tb local restart --skip-new-version --yes`: Restart Tinybird Local container in non-interactive mode",
|
|
41
|
+
"`tb pull --only-vendored`: Pull only the vendored datasources from other workspaces",
|
|
40
42
|
]
|
|
41
43
|
|
|
42
44
|
plan_instructions = """
|
|
@@ -166,7 +168,6 @@ SQL >
|
|
|
166
168
|
|
|
167
169
|
def resources_prompt(project: Project) -> str:
|
|
168
170
|
files = project.get_project_files()
|
|
169
|
-
fixture_files = project.get_fixture_files()
|
|
170
171
|
|
|
171
172
|
resources_content = "# Existing resources in the project:\n"
|
|
172
173
|
if files:
|
|
@@ -184,7 +185,36 @@ def resources_prompt(project: Project) -> str:
|
|
|
184
185
|
else:
|
|
185
186
|
resources_content += "No resources found"
|
|
186
187
|
|
|
188
|
+
return resources_content
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def vendor_files_prompt(project: Project) -> str:
|
|
192
|
+
files = project.get_vendored_files()
|
|
193
|
+
content = "# Datasources shared from other workspaces:\n"
|
|
194
|
+
if files:
|
|
195
|
+
resources: list[dict[str, Any]] = []
|
|
196
|
+
for filename in files:
|
|
197
|
+
file_path = Path(filename)
|
|
198
|
+
workspace_name = file_path.parent.parent.name
|
|
199
|
+
resource = {
|
|
200
|
+
"path": str(file_path.relative_to(project.folder)),
|
|
201
|
+
"type": get_resource_type(file_path),
|
|
202
|
+
"name": f"{workspace_name}.{file_path.stem}",
|
|
203
|
+
"content": file_path.read_text(),
|
|
204
|
+
"origin_workspace": workspace_name,
|
|
205
|
+
}
|
|
206
|
+
resources.append(resource)
|
|
207
|
+
content += format_as_xml(resources, root_tag="resources", item_tag="resource")
|
|
208
|
+
else:
|
|
209
|
+
content += "No datasources shared from other workspaces"
|
|
210
|
+
|
|
211
|
+
return content
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
def fixtures_prompt(project: Project) -> str:
|
|
215
|
+
fixture_files = project.get_fixture_files()
|
|
187
216
|
fixture_content = "# Fixture files in the project:\n"
|
|
217
|
+
|
|
188
218
|
if fixture_files:
|
|
189
219
|
fixtures: list[dict[str, Any]] = []
|
|
190
220
|
for filename in fixture_files:
|
|
@@ -199,7 +229,7 @@ def resources_prompt(project: Project) -> str:
|
|
|
199
229
|
else:
|
|
200
230
|
fixture_content += "No fixture files found"
|
|
201
231
|
|
|
202
|
-
return
|
|
232
|
+
return fixture_content
|
|
203
233
|
|
|
204
234
|
|
|
205
235
|
def service_datasources_prompt() -> str:
|
|
@@ -954,6 +984,23 @@ After changes have been deployed and promoted, if you want to deploy other chang
|
|
|
954
984
|
If after running a deployment, the error contains a recommended forward query, use it to update the .datasource file.
|
|
955
985
|
</dev_notes>
|
|
956
986
|
|
|
987
|
+
## Sharing datasources with other workspaces
|
|
988
|
+
To share a Data Source, in the .datasource file you want to share, add the destination workspace(s). For example:
|
|
989
|
+
|
|
990
|
+
```
|
|
991
|
+
SHARED_WITH >
|
|
992
|
+
destination_workspace,
|
|
993
|
+
other_destination_workspace
|
|
994
|
+
```
|
|
995
|
+
|
|
996
|
+
## Working with shared datasources:
|
|
997
|
+
|
|
998
|
+
The following limitations apply to shared datasources:
|
|
999
|
+
- Shared datasources are read-only.
|
|
1000
|
+
- You can't share a shared datasource, only the original.
|
|
1001
|
+
- You can't check the quarantine of a shared datasource.
|
|
1002
|
+
- You can't create a Materialized View from a shared datasource.
|
|
1003
|
+
|
|
957
1004
|
# Working with any type of pipe file:
|
|
958
1005
|
{pipe_instructions}
|
|
959
1006
|
{pipe_example}
|
{tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/run_command.py
RENAMED
|
@@ -3,6 +3,7 @@ import subprocess
|
|
|
3
3
|
import click
|
|
4
4
|
from pydantic_ai import RunContext
|
|
5
5
|
|
|
6
|
+
from tinybird.tb.modules.agent.prompts import available_commands
|
|
6
7
|
from tinybird.tb.modules.agent.utils import (
|
|
7
8
|
AgentRunCancelled,
|
|
8
9
|
SubAgentRunCancelled,
|
|
@@ -20,6 +21,14 @@ def run_command(ctx: RunContext[TinybirdAgentContext], command: str):
|
|
|
20
21
|
command (str): The command to run. Required. Examples: `tb --local sql "select 1"`, `tb --cloud datasource ls`, `tb --help`
|
|
21
22
|
"""
|
|
22
23
|
try:
|
|
24
|
+
clean_commands = [cmd.split(":")[0].replace("`", "").split("[")[0] for cmd in available_commands]
|
|
25
|
+
available_commands_to_cloud = [f"tb --cloud {command.replace('tb ', '')}" for command in clean_commands]
|
|
26
|
+
available_commands_to_local = [f"tb --local {command.replace('tb ', '')}" for command in clean_commands]
|
|
27
|
+
all_commands = clean_commands + available_commands_to_cloud + available_commands_to_local
|
|
28
|
+
|
|
29
|
+
if not any(cmd.startswith(command) for cmd in all_commands):
|
|
30
|
+
raise SubAgentRunCancelled(f"Command {command} not found in the list of available commands")
|
|
31
|
+
|
|
23
32
|
ctx.deps.thinking_animation.stop()
|
|
24
33
|
force_confirmation = " deploy" in command.lower() or " truncate" in command.lower()
|
|
25
34
|
confirmation = show_confirmation(
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/deploy_check.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/agent/tools/diff_resource.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/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.dev291 → tinybird-0.0.1.dev292}/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
|
|
File without changes
|
{tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/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.dev291 → tinybird-0.0.1.dev292}/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.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev291 → tinybird-0.0.1.dev292}/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
|