dacli 0.2.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.
- dacli/__init__.py +7 -0
- dacli/config/__init__.py +34 -0
- dacli/config/policy.yaml +120 -0
- dacli/config/settings.py +765 -0
- dacli/connectors/__init__.py +17 -0
- dacli/connectors/airflow/SKILL.md +31 -0
- dacli/connectors/airflow/__init__.py +0 -0
- dacli/connectors/airflow/connector.py +270 -0
- dacli/connectors/airflow/manifest.yaml +13 -0
- dacli/connectors/base.py +196 -0
- dacli/connectors/bigquery/SKILL.md +31 -0
- dacli/connectors/bigquery/__init__.py +0 -0
- dacli/connectors/bigquery/connector.py +306 -0
- dacli/connectors/bigquery/manifest.yaml +13 -0
- dacli/connectors/cli_base.py +174 -0
- dacli/connectors/dagster/SKILL.md +28 -0
- dacli/connectors/dagster/__init__.py +0 -0
- dacli/connectors/dagster/connector.py +216 -0
- dacli/connectors/dagster/manifest.yaml +13 -0
- dacli/connectors/databricks/SKILL.md +28 -0
- dacli/connectors/databricks/__init__.py +0 -0
- dacli/connectors/databricks/connector.py +221 -0
- dacli/connectors/databricks/manifest.yaml +13 -0
- dacli/connectors/dbt/SKILL.md +39 -0
- dacli/connectors/dbt/__init__.py +0 -0
- dacli/connectors/dbt/connector.py +260 -0
- dacli/connectors/dbt/manifest.yaml +13 -0
- dacli/connectors/dispatcher.py +301 -0
- dacli/connectors/dod.py +210 -0
- dacli/connectors/dynamodb/SKILL.md +34 -0
- dacli/connectors/dynamodb/__init__.py +0 -0
- dacli/connectors/dynamodb/connector.py +301 -0
- dacli/connectors/dynamodb/manifest.yaml +13 -0
- dacli/connectors/gcs/SKILL.md +30 -0
- dacli/connectors/gcs/__init__.py +0 -0
- dacli/connectors/gcs/connector.py +242 -0
- dacli/connectors/gcs/manifest.yaml +13 -0
- dacli/connectors/github/SKILL.md +30 -0
- dacli/connectors/github/__init__.py +3 -0
- dacli/connectors/github/connector.py +1032 -0
- dacli/connectors/github/manifest.yaml +13 -0
- dacli/connectors/http_base.py +123 -0
- dacli/connectors/mcp_bridge/SKILL.md +39 -0
- dacli/connectors/mcp_bridge/__init__.py +0 -0
- dacli/connectors/mcp_bridge/connector.py +295 -0
- dacli/connectors/mcp_bridge/manifest.yaml +15 -0
- dacli/connectors/mongodb/SKILL.md +34 -0
- dacli/connectors/mongodb/__init__.py +0 -0
- dacli/connectors/mongodb/connector.py +300 -0
- dacli/connectors/mongodb/manifest.yaml +13 -0
- dacli/connectors/mysql/SKILL.md +30 -0
- dacli/connectors/mysql/__init__.py +0 -0
- dacli/connectors/mysql/connector.py +275 -0
- dacli/connectors/mysql/manifest.yaml +13 -0
- dacli/connectors/pinecone/SKILL.md +26 -0
- dacli/connectors/pinecone/__init__.py +3 -0
- dacli/connectors/pinecone/connector.py +257 -0
- dacli/connectors/pinecone/manifest.yaml +13 -0
- dacli/connectors/postgres/SKILL.md +30 -0
- dacli/connectors/postgres/__init__.py +0 -0
- dacli/connectors/postgres/connector.py +279 -0
- dacli/connectors/postgres/manifest.yaml +13 -0
- dacli/connectors/registry.py +493 -0
- dacli/connectors/s3/SKILL.md +31 -0
- dacli/connectors/s3/__init__.py +0 -0
- dacli/connectors/s3/connector.py +245 -0
- dacli/connectors/s3/manifest.yaml +13 -0
- dacli/connectors/shell/__init__.py +13 -0
- dacli/connectors/shell/connector.py +257 -0
- dacli/connectors/snowflake/SKILL.md +32 -0
- dacli/connectors/snowflake/__init__.py +3 -0
- dacli/connectors/snowflake/connector.py +627 -0
- dacli/connectors/snowflake/manifest.yaml +15 -0
- dacli/connectors/system/__init__.py +3 -0
- dacli/connectors/system/connector.py +510 -0
- dacli/connectors/templates/README.md +25 -0
- dacli/connectors/templates/cli_connector_template.py +77 -0
- dacli/connectors/templates/manifest_template.yaml +25 -0
- dacli/connectors/templates/rest_connector_template.py +124 -0
- dacli/context/__init__.py +16 -0
- dacli/context/assembler.py +303 -0
- dacli/context/budget.py +119 -0
- dacli/context/compaction.py +125 -0
- dacli/context/disclosure.py +101 -0
- dacli/context/pipeline.py +102 -0
- dacli/context/sources/__init__.py +13 -0
- dacli/context/sources/dbt_manifest.py +176 -0
- dacli/context/sources/terminal.py +185 -0
- dacli/context/spill.py +155 -0
- dacli/context/tokenizer.py +136 -0
- dacli/core/__init__.py +38 -0
- dacli/core/agent.py +723 -0
- dacli/core/atomicio.py +71 -0
- dacli/core/blackboard.py +274 -0
- dacli/core/connect_flow.py +241 -0
- dacli/core/connector_config.py +66 -0
- dacli/core/connector_generator.py +585 -0
- dacli/core/connector_index.py +184 -0
- dacli/core/connector_workflow.py +336 -0
- dacli/core/crypto.py +196 -0
- dacli/core/export_run.py +133 -0
- dacli/core/fastjson.py +46 -0
- dacli/core/headless.py +287 -0
- dacli/core/kernel.py +354 -0
- dacli/core/logging_setup.py +132 -0
- dacli/core/loop.py +316 -0
- dacli/core/memory.py +475 -0
- dacli/core/plan_preview.py +185 -0
- dacli/core/planner.py +324 -0
- dacli/core/pricing.py +309 -0
- dacli/core/router.py +335 -0
- dacli/core/setup_wizard.py +473 -0
- dacli/core/store.py +273 -0
- dacli/core/subagent.py +262 -0
- dacli/core/test_mode.py +107 -0
- dacli/core/timeutils.py +19 -0
- dacli/core/verify.py +477 -0
- dacli/eval/__init__.py +41 -0
- dacli/eval/__main__.py +95 -0
- dacli/eval/calibration.py +112 -0
- dacli/eval/dashboard.py +109 -0
- dacli/eval/golden/__init__.py +34 -0
- dacli/eval/golden/connectors.py +211 -0
- dacli/eval/golden/spine.py +218 -0
- dacli/eval/golden/terminal.py +346 -0
- dacli/eval/harness.py +147 -0
- dacli/eval/passk.py +153 -0
- dacli/eval/regression.py +145 -0
- dacli/eval/report.py +194 -0
- dacli/eval/selfimprove.py +146 -0
- dacli/eval/sim/__init__.py +36 -0
- dacli/eval/sim/cli.py +69 -0
- dacli/eval/sim/platforms.py +102 -0
- dacli/eval/sim/shell.py +321 -0
- dacli/eval/types.py +125 -0
- dacli/governance/__init__.py +68 -0
- dacli/governance/audit.py +168 -0
- dacli/governance/classifier.py +312 -0
- dacli/governance/command_classifier.py +472 -0
- dacli/governance/governor.py +409 -0
- dacli/governance/permissions.py +133 -0
- dacli/governance/policy_engine.py +203 -0
- dacli/governance/rollback.py +367 -0
- dacli/governance/shadow.py +120 -0
- dacli/governance/vocab.py +88 -0
- dacli/memory/__init__.py +60 -0
- dacli/memory/catalog.py +289 -0
- dacli/memory/episodic.py +71 -0
- dacli/memory/priors.py +162 -0
- dacli/memory/procedural.py +48 -0
- dacli/memory/retrieval.py +125 -0
- dacli/memory/semantic.py +45 -0
- dacli/memory/store.py +251 -0
- dacli/memory/verify.py +160 -0
- dacli/prompts/GUIDELINES.md +27 -0
- dacli/prompts/__init__.py +15 -0
- dacli/prompts/fragments/core.md +97 -0
- dacli/prompts/fragments/github.md +7 -0
- dacli/prompts/fragments/snowflake.md +11 -0
- dacli/prompts/system_prompt.py +91 -0
- dacli/reasoning/__init__.py +16 -0
- dacli/reasoning/llm.py +207 -0
- dacli/reasoning/model_router.py +234 -0
- dacli/reasoning/providers.py +376 -0
- dacli/reasoning/scripted.py +79 -0
- dacli/sandbox/__init__.py +25 -0
- dacli/sandbox/_worker.py +148 -0
- dacli/sandbox/bridge.py +102 -0
- dacli/sandbox/connector.py +121 -0
- dacli/sandbox/docker/worker.py +184 -0
- dacli/sandbox/docker_runtime.py +277 -0
- dacli/sandbox/factory.py +63 -0
- dacli/sandbox/policy.py +116 -0
- dacli/sandbox/runtime.py +203 -0
- dacli/sandbox/sdk.py +182 -0
- dacli/sandbox/shells/__init__.py +42 -0
- dacli/sandbox/shells/base.py +159 -0
- dacli/sandbox/shells/powershell.py +41 -0
- dacli/sandbox/shells/transports.py +257 -0
- dacli/sandbox/shells/windows_cmd.py +20 -0
- dacli/sandbox/shells/wsl.py +22 -0
- dacli/sandbox/shells/zsh.py +20 -0
- dacli/sandbox/terminal.py +341 -0
- dacli/sandbox/workspace.py +124 -0
- dacli/scripts/__init__.py +1 -0
- dacli/scripts/clean.py +73 -0
- dacli/scripts/cli.py +1556 -0
- dacli/scripts/smoke_connector_lifecycle.py +295 -0
- dacli/skills/__init__.py +12 -0
- dacli/skills/connector.py +73 -0
- dacli/skills/data_diff/SKILL.md +57 -0
- dacli/skills/data_diff/__init__.py +0 -0
- dacli/skills/data_diff/skill.py +270 -0
- dacli/skills/diagram_mermaid/SKILL.md +41 -0
- dacli/skills/diagram_mermaid/__init__.py +5 -0
- dacli/skills/diagram_mermaid/skill.py +203 -0
- dacli/skills/registry.py +141 -0
- dacli/skills/spec.py +85 -0
- dacli/tui/__init__.py +21 -0
- dacli/tui/design.py +153 -0
- dacli/tui/theme.py +329 -0
- dacli/tui/ui.py +1718 -0
- dacli-0.2.0.dist-info/METADATA +515 -0
- dacli-0.2.0.dist-info/RECORD +207 -0
- dacli-0.2.0.dist-info/WHEEL +5 -0
- dacli-0.2.0.dist-info/entry_points.txt +2 -0
- dacli-0.2.0.dist-info/top_level.txt +1 -0
dacli/__init__.py
ADDED
dacli/config/__init__.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from dacli.config.settings import Settings, is_llm_configured, load_config
|
|
2
|
+
|
|
3
|
+
CLI_COMMANDS = [
|
|
4
|
+
("/help", "Show this help message"),
|
|
5
|
+
("/keys", "Show keyboard shortcuts"),
|
|
6
|
+
("/init", "Generate a DACLI.md priors draft from your config"),
|
|
7
|
+
("/status", "Show current progress and state"),
|
|
8
|
+
("/usage", "Show token usage and cost (overall, by model, this session)"),
|
|
9
|
+
("/context", "Explain the assembled context (sources, tokens, budget)"),
|
|
10
|
+
("/audit", "Show governance decisions for this session (why the agent acted)"),
|
|
11
|
+
("/tools", "Show enabled tools and capabilities"),
|
|
12
|
+
("/connect [tool]", "Configure a connector — interactive, or pass a name"),
|
|
13
|
+
("/new-connector", "Generate a new connector from natural language description"),
|
|
14
|
+
("/testmode [tool]", "Toggle staging test mode (health-gated, side-effect-free) for new connectors"),
|
|
15
|
+
("/import-connector", "Import a tested connector from sandbox to local"),
|
|
16
|
+
("/push-connector", "Git commit and push a new connector"),
|
|
17
|
+
("/debug-connector <name>", "Debug a failing connector with LLM assistance"),
|
|
18
|
+
("/setup", "Run the tool configuration wizard"),
|
|
19
|
+
("/history", "Show conversation history"),
|
|
20
|
+
("/sessions", "List available sessions"),
|
|
21
|
+
("/catalog [connector]", "List known data objects from the catalog cache"),
|
|
22
|
+
("/schema <object>", "Show cached columns/row-count for one object"),
|
|
23
|
+
("/load <id>", "Load a previous session"),
|
|
24
|
+
("/export", "Export current state to JSON"),
|
|
25
|
+
("/config", "Show current configuration"),
|
|
26
|
+
("/theme <name>", "Switch UI theme (dark, light, ocean, mono)"),
|
|
27
|
+
("/prompt", "View/edit the system prompt"),
|
|
28
|
+
("/clear", "Clear conversation history"),
|
|
29
|
+
("/cls", "Clear the screen (keeps conversation history)"),
|
|
30
|
+
("/reset", "Reset agent state"),
|
|
31
|
+
("/exit", "Exit the CLI"),
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
__all__ = ["CLI_COMMANDS", "Settings", "is_llm_configured", "load_config"]
|
dacli/config/policy.yaml
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# DACLI governance policy.
|
|
2
|
+
#
|
|
3
|
+
# Maps blast-radius tiers to enforcement decisions. This file lets a team tune
|
|
4
|
+
# velocity vs. caution per connector / environment WITHOUT code changes. Absent
|
|
5
|
+
# any override, the locked posture applies:
|
|
6
|
+
#
|
|
7
|
+
# safe -> auto (run immediately)
|
|
8
|
+
# write -> verify (run + mandatory post-condition)
|
|
9
|
+
# risky -> confirm (human confirm + rollback plan)
|
|
10
|
+
# irreversible -> dry_run+approve (dry-run + verified rollback + approval)
|
|
11
|
+
#
|
|
12
|
+
# Resolution is most-specific-wins:
|
|
13
|
+
# connectors.<id>.environments.<env> > connectors.<id>.tiers > defaults
|
|
14
|
+
#
|
|
15
|
+
# Valid decisions: auto | verify | confirm | dry_run+approve
|
|
16
|
+
|
|
17
|
+
# Global tier -> decision overrides (apply to every connector unless a more
|
|
18
|
+
# specific rule below matches). Leave empty to keep the locked posture.
|
|
19
|
+
defaults: {}
|
|
20
|
+
|
|
21
|
+
# Identifier tokens that mark an action's target as production. A prod target
|
|
22
|
+
# promotes the classifier tier one step (write->risky, risky->irreversible).
|
|
23
|
+
prod_markers:
|
|
24
|
+
- PROD
|
|
25
|
+
- PRODUCTION
|
|
26
|
+
- GOLD
|
|
27
|
+
- PRD
|
|
28
|
+
|
|
29
|
+
# Least-privilege scope per connector (the connection-profile opt-in). The code
|
|
30
|
+
# default is `read_only` (an action above the scope is refused even if the model
|
|
31
|
+
# asks). Widen here to enable writes/destructive ops:
|
|
32
|
+
# read_only -> safe only | write -> +create/insert | risky -> +update/delete |
|
|
33
|
+
# admin -> +drop/truncate. Tighten any connector to read_only to make it
|
|
34
|
+
# strictly observe-only.
|
|
35
|
+
connectors:
|
|
36
|
+
snowflake:
|
|
37
|
+
scope: admin # full SQL; set to read_only to make Snowflake observe-only
|
|
38
|
+
# Connector-wide rules (any environment).
|
|
39
|
+
tiers: {}
|
|
40
|
+
environments:
|
|
41
|
+
# Example: a dev warehouse is low-stakes — let writes through without a
|
|
42
|
+
# post-condition gate, but still confirm genuinely risky DML.
|
|
43
|
+
dev:
|
|
44
|
+
write: auto
|
|
45
|
+
# Production stays strict (this is the default, shown for clarity).
|
|
46
|
+
prod:
|
|
47
|
+
write: verify
|
|
48
|
+
risky: confirm
|
|
49
|
+
irreversible: dry_run+approve
|
|
50
|
+
|
|
51
|
+
github:
|
|
52
|
+
scope: admin # allows push + delete; set to write to forbid deletes
|
|
53
|
+
tiers: {}
|
|
54
|
+
environments: {}
|
|
55
|
+
|
|
56
|
+
# --- Era 2: the governed shell tier --------------------------------------
|
|
57
|
+
# The shell tier (run_shell_command) flows through this SAME policy table: the
|
|
58
|
+
# *command* is blast-radius-classified (an `ls` is safe; `rm -rf` / `git push
|
|
59
|
+
# --force` are irreversible and refused for want of a verifiable undo). Its
|
|
60
|
+
# least-privilege ceiling is set by `terminal.scope` in settings (default
|
|
61
|
+
# 'write'), which is authoritative over any `scope:` here. The tiers/
|
|
62
|
+
# environments overrides below still apply — e.g. require approval for every
|
|
63
|
+
# shell write, or auto-run writes on a throwaway box.
|
|
64
|
+
shell:
|
|
65
|
+
tiers: {} # e.g. {write: confirm} to gate even mkdir/touch
|
|
66
|
+
environments: {}
|
|
67
|
+
|
|
68
|
+
# --- Wave 1 platforms ---------------------------------------------
|
|
69
|
+
# All ship read-only (the code default). Widen the grant per deployment:
|
|
70
|
+
# write -> +create/insert/put | risky -> +update/delete | admin -> +drop.
|
|
71
|
+
# A platform left at read_only is strictly observe-only even if the model asks
|
|
72
|
+
# to write — the capability simply isn't there to misuse.
|
|
73
|
+
dbt:
|
|
74
|
+
scope: read_only # widen to `risky` to allow `dbt run` / `dbt build`
|
|
75
|
+
tiers: {}
|
|
76
|
+
environments: {}
|
|
77
|
+
bigquery:
|
|
78
|
+
scope: read_only # native dry_run gives an exact cost/effect preview first
|
|
79
|
+
tiers: {}
|
|
80
|
+
environments: {}
|
|
81
|
+
databricks:
|
|
82
|
+
scope: read_only # Delta time travel backs RESTORE-based rollback
|
|
83
|
+
tiers: {}
|
|
84
|
+
environments: {}
|
|
85
|
+
s3:
|
|
86
|
+
scope: read_only # enable bucket versioning before granting delete (admin)
|
|
87
|
+
tiers: {}
|
|
88
|
+
environments: {}
|
|
89
|
+
gcs:
|
|
90
|
+
scope: read_only # enable object versioning before granting delete (admin)
|
|
91
|
+
tiers: {}
|
|
92
|
+
environments: {}
|
|
93
|
+
|
|
94
|
+
# --- Wave 2 operational databases ---------------------------------
|
|
95
|
+
postgres:
|
|
96
|
+
scope: read_only # fully transactional — BEGIN/ROLLBACK is a true undo
|
|
97
|
+
tiers: {}
|
|
98
|
+
environments: {}
|
|
99
|
+
mysql:
|
|
100
|
+
scope: read_only # DML transactional (InnoDB); DDL needs mysqldump snapshots
|
|
101
|
+
tiers: {}
|
|
102
|
+
environments: {}
|
|
103
|
+
mongodb:
|
|
104
|
+
scope: read_only # no native undo — deletes rely on mongodump copy-aside
|
|
105
|
+
tiers: {}
|
|
106
|
+
environments: {}
|
|
107
|
+
dynamodb:
|
|
108
|
+
scope: read_only # enable PITR before granting destructive ops (admin)
|
|
109
|
+
tiers: {}
|
|
110
|
+
environments: {}
|
|
111
|
+
|
|
112
|
+
# --- Wave 3 orchestration ---------------------------------------------------
|
|
113
|
+
airflow:
|
|
114
|
+
scope: read_only # grant `risky` to trigger/pause; delete is gated hard
|
|
115
|
+
tiers: {}
|
|
116
|
+
environments: {}
|
|
117
|
+
dagster:
|
|
118
|
+
scope: read_only # grant `risky` to launch runs
|
|
119
|
+
tiers: {}
|
|
120
|
+
environments: {}
|