commons 0.1.0__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.
- commons/__init__.py +48 -0
- commons/_agent.py +655 -0
- commons/_backends.py +244 -0
- commons/_catalog/__init__.py +73 -0
- commons/_catalog/_core.py +617 -0
- commons/_catalog/_databricks.py +296 -0
- commons/_catalog/_databricks_semantic.py +485 -0
- commons/_catalog/_import.py +270 -0
- commons/_catalog/_security.py +433 -0
- commons/_catalog/_snowflake.py +174 -0
- commons/_catalog/_snowflake_semantic.py +566 -0
- commons/_citation_scan.py +320 -0
- commons/_citations.py +383 -0
- commons/_connect.py +683 -0
- commons/_context_layer.py +193 -0
- commons/_data_dictionary.py +478 -0
- commons/_data_source.py +736 -0
- commons/_definitions/__init__.py +51 -0
- commons/_definitions/_compile.py +578 -0
- commons/_definitions/_emit_duckdb.py +346 -0
- commons/_definitions/_emit_sql.py +546 -0
- commons/_definitions/_export.py +876 -0
- commons/_definitions/_expression.py +529 -0
- commons/_definitions/_registry.py +311 -0
- commons/_display.py +322 -0
- commons/_duckdb.py +62 -0
- commons/_execution/__init__.py +1 -0
- commons/_execution/_backend.py +494 -0
- commons/_execution/_driver.py +511 -0
- commons/_execution/_env.py +74 -0
- commons/_execution/_protocol.py +1318 -0
- commons/_execution/_runtime/__init__.py +10 -0
- commons/_execution/_runtime/_figure_backend.py +30 -0
- commons/_execution/_runtime/_guardrails.py +215 -0
- commons/_execution/_runtime/_landlock.py +375 -0
- commons/_execution/_runtime/_limits.py +43 -0
- commons/_execution/_runtime/_plots.py +205 -0
- commons/_execution/_runtime/_repl.py +367 -0
- commons/_execution/_runtime/_seatbelt.py +155 -0
- commons/_execution/_runtime/_seccomp.py +821 -0
- commons/_execution/_runtime/_userns.py +662 -0
- commons/_execution/_runtime/_worker.py +451 -0
- commons/_execution/_sandbox.py +202 -0
- commons/_execution/_thread.py +190 -0
- commons/_frames.py +147 -0
- commons/_handles.py +84 -0
- commons/_icons.py +56 -0
- commons/_measure_results.py +206 -0
- commons/_measures.py +893 -0
- commons/_pool.py +602 -0
- commons/_prompt.py +303 -0
- commons/_provenance.py +156 -0
- commons/_reminders.py +56 -0
- commons/_rows.py +166 -0
- commons/_run_python.py +428 -0
- commons/_semantic_models.py +943 -0
- commons/_skills.py +53 -0
- commons/_sql_guard.py +167 -0
- commons/_tools.py +1005 -0
- commons/_tracing.py +387 -0
- commons/_trajectory/__init__.py +157 -0
- commons/_trajectory/_build.py +618 -0
- commons/_trajectory/_deployment.py +337 -0
- commons/_trajectory/_otlp.py +156 -0
- commons/_trajectory/_semconv.py +154 -0
- commons/_trajectory/_source.py +263 -0
- commons/_ui/__init__.py +46 -0
- commons/_ui/_app.py +58 -0
- commons/_ui/_assets.py +52 -0
- commons/_ui/_server.py +78 -0
- commons/_ui/_theme.py +61 -0
- commons/prompts/README.md +1 -0
- commons/prompts/citation-request.md +1 -0
- commons/prompts/skills/artifacts/SKILL.md +35 -0
- commons/prompts/skills/trust-system/SKILL.md +15 -0
- commons/prompts/system-prompt.md +173 -0
- commons/py.typed +0 -0
- commons/skills/commons/SKILL.md +105 -0
- commons/skills/commons/references/data-dictionaries.md +77 -0
- commons/skills/commons/references/evaluation.md +200 -0
- commons/skills/commons/references/extracting-from-artifacts.md +62 -0
- commons/skills/commons/references/iterating-from-trajectories.md +43 -0
- commons/skills/commons/references/onboarding.md +156 -0
- commons/ui.py +5 -0
- commons/www/README.md +1 -0
- commons/www/commons-chat/commons-artifact.css +79 -0
- commons/www/commons-chat/commons-artifact.js +358 -0
- commons/www/commons-chat/commons-chat.css +716 -0
- commons/www/commons-chat/commons-chat.js +94 -0
- commons/www/commons-chat/commons-document.css +187 -0
- commons/www/commons-chat/figs/citation-definition.svg +4 -0
- commons/www/commons-chat/figs/citation-mark.svg +5 -0
- commons/www/commons-chat/figs/citation-prose.svg +4 -0
- commons/www/commons-chat/figs/citation-schema.svg +4 -0
- commons/www/commons-chat/figs/trusted-icon.svg +6 -0
- commons/www/commons-chat/figs/warning-icon.svg +7 -0
- commons/www/commons-share/commons-share.css +166 -0
- commons/www/commons-share/commons-share.js +131 -0
- commons-0.1.0.dist-info/METADATA +96 -0
- commons-0.1.0.dist-info/RECORD +102 -0
- commons-0.1.0.dist-info/WHEEL +4 -0
- commons-0.1.0.dist-info/licenses/LICENSE.md +21 -0
commons/__init__.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""Build trustworthy data agents.
|
|
2
|
+
|
|
3
|
+
Give an LLM data, semantic, and context layers to work with, tools for
|
|
4
|
+
querying them, and A/B/C provenance semantics so every answer carries a
|
|
5
|
+
classification as to how much it can be trusted.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import importlib
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from ._agent import Commons
|
|
12
|
+
from ._citations import CitationDecision
|
|
13
|
+
from ._context_layer import ContextLayer, context_layer
|
|
14
|
+
from ._data_source import DataSource, data_source, list_tables
|
|
15
|
+
from ._measures import Injected, Measure, SemanticLayer, measure, semantic_layer
|
|
16
|
+
from ._provenance import Tag
|
|
17
|
+
from ._trajectory import Exchange, Trajectory, trajectory_read
|
|
18
|
+
|
|
19
|
+
__all__: list[str] = [
|
|
20
|
+
"CitationDecision",
|
|
21
|
+
"Commons",
|
|
22
|
+
"ContextLayer",
|
|
23
|
+
"DataSource",
|
|
24
|
+
"Exchange",
|
|
25
|
+
"Injected",
|
|
26
|
+
"Measure",
|
|
27
|
+
"SemanticLayer",
|
|
28
|
+
"Tag",
|
|
29
|
+
"Trajectory",
|
|
30
|
+
"context_layer",
|
|
31
|
+
"data_source",
|
|
32
|
+
"list_tables",
|
|
33
|
+
"measure",
|
|
34
|
+
"semantic_layer",
|
|
35
|
+
"trajectory_read",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def __getattr__(name: str) -> Any:
|
|
40
|
+
# `commons.ui` is resolved on first use so that importing commons does
|
|
41
|
+
# not import shiny for users who may never build a UI.
|
|
42
|
+
if name == "ui":
|
|
43
|
+
return importlib.import_module(f"{__name__}.ui")
|
|
44
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def __dir__() -> list[str]:
|
|
48
|
+
return sorted([*__all__, "ui"])
|