maskflow-cli 0.8.2__tar.gz → 0.9.0__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.
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/PKG-INFO +3 -1
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/pyproject.toml +7 -1
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/app.py +6 -0
- maskflow_cli-0.9.0/src/maskflow_cli/commands/agent_cmd.py +27 -0
- maskflow_cli-0.9.0/tests/test_cli_agent.py +15 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/.dockerignore +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/.gitignore +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/Dockerfile +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/README.md +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/examples/README.md +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/examples/generate_sample.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/examples/sample-llm-traffic.jsonl +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/packaging/README.md +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/packaging/_entry.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/packaging/maskflow.spec +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/__init__.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/bench_render.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/commands/__init__.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/commands/bench_cmd.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/commands/config_cmd.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/commands/doctor_cmd.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/commands/explain_cmd.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/doctor.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/doctor_render.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/evidence.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/explain.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/explain_render.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/render.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/__init__.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/aggregate.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/checkpoint.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/cmd.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/errors.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/fieldsel.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/pipeline.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/report/__init__.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/report/assets.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/report/build.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/report/csv_out.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/report/html.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/report/json_out.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/report/summary.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/severity.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/__init__.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/_api_common.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/_files.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/_http.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/_meta.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/base.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/csv.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/dir.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/helicone.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/jsonl.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/langfuse.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/langsmith.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/postgres.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/sources/s3.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/spec.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/src/maskflow_cli/scan/worker.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/conftest.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/fixtures/partial.toml +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/fixtures/typo.toml +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/fixtures/valid.toml +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/scan/__init__.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/scan/_fuzz_corpus.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/scan/conftest.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/scan/test_aggregate_and_severity.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/scan/test_example_file.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/scan/test_fieldsel.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/scan/test_pipeline_and_report.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/scan/test_report_no_pii_leak.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/scan/test_sources_api.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/scan/test_sources_files.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/test_cli_bench.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/test_cli_doctor.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/test_cli_explain.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/test_cli_pack_registration.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/test_cli_show.py +0 -0
- {maskflow_cli-0.8.2 → maskflow_cli-0.9.0}/tests/test_cli_validate.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: maskflow-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: Command-line interface for MaskFlow: .maskflowrc config validation and inspection
|
|
5
5
|
License: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -11,6 +11,8 @@ Requires-Dist: maskflow-pack-intl<0.4,>=0.3.0
|
|
|
11
11
|
Requires-Dist: rich>=13.0
|
|
12
12
|
Requires-Dist: tomli-w>=1.0
|
|
13
13
|
Requires-Dist: typer>=0.12
|
|
14
|
+
Provides-Extra: agent
|
|
15
|
+
Requires-Dist: maskflow-agent<0.2,>=0.1.0; extra == 'agent'
|
|
14
16
|
Provides-Extra: bench
|
|
15
17
|
Requires-Dist: maskflow-bench<0.2,>=0.1.0; extra == 'bench'
|
|
16
18
|
Provides-Extra: dev
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "maskflow-cli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.9.0"
|
|
4
4
|
description = "Command-line interface for MaskFlow: .maskflowrc config validation and inspection"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -86,8 +86,14 @@ postgres = [
|
|
|
86
86
|
bench = [
|
|
87
87
|
"maskflow-bench>=0.1.0,<0.2",
|
|
88
88
|
]
|
|
89
|
+
# `maskflow agent install|uninstall|doctor` -- passthrough to maskflow-agent's
|
|
90
|
+
# own console script (Claude Code PII guard). Lazy-imported by agent_cmd.py.
|
|
91
|
+
agent = [
|
|
92
|
+
"maskflow-agent>=0.1.0,<0.2",
|
|
93
|
+
]
|
|
89
94
|
|
|
90
95
|
[tool.uv.sources]
|
|
96
|
+
maskflow-agent = { workspace = true }
|
|
91
97
|
maskflow-core = { workspace = true }
|
|
92
98
|
maskflow-pack-intl = { workspace = true }
|
|
93
99
|
maskflow-pack-india = { workspace = true }
|
|
@@ -11,6 +11,7 @@ import maskflow_pack_intl # noqa: F401 -- import side effect registers pack-int
|
|
|
11
11
|
import maskflow_pack_india # noqa: F401 -- import side effect registers pack-india's entity types
|
|
12
12
|
import typer
|
|
13
13
|
|
|
14
|
+
from .commands.agent_cmd import agent
|
|
14
15
|
from .commands.bench_cmd import bench
|
|
15
16
|
from .commands.config_cmd import app as config_app
|
|
16
17
|
from .commands.doctor_cmd import doctor
|
|
@@ -23,6 +24,11 @@ app.command("doctor")(doctor)
|
|
|
23
24
|
app.command("explain")(explain)
|
|
24
25
|
app.command("scan")(scan)
|
|
25
26
|
app.command("bench")(bench)
|
|
27
|
+
app.command(
|
|
28
|
+
"agent",
|
|
29
|
+
context_settings={"allow_extra_args": True, "ignore_unknown_options": True},
|
|
30
|
+
add_help_option=False,
|
|
31
|
+
)(agent)
|
|
26
32
|
|
|
27
33
|
|
|
28
34
|
def main() -> None:
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""`maskflow agent ...` -- passthrough to the `maskflow-agent` console script
|
|
2
|
+
(Claude Code PII guard: install / uninstall / doctor).
|
|
3
|
+
|
|
4
|
+
`maskflow-agent` is an **optional** dependency (`pip install
|
|
5
|
+
'maskflow-cli[agent]'`), imported lazily like `maskflow bench`. The hooks
|
|
6
|
+
themselves never go through this command: `maskflow-agent install` writes
|
|
7
|
+
`python -m maskflow_agent hook ...` so each tool call skips this CLI's
|
|
8
|
+
pack/typer import cost.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import typer
|
|
14
|
+
|
|
15
|
+
_MISSING = (
|
|
16
|
+
"`maskflow agent` needs the agent extra -- install it with: pip install 'maskflow-cli[agent]'"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def agent(ctx: typer.Context) -> None:
|
|
21
|
+
"""Claude Code PII guard: `maskflow agent install | uninstall | doctor`."""
|
|
22
|
+
try:
|
|
23
|
+
from maskflow_agent.cli import main as agent_main
|
|
24
|
+
except ImportError:
|
|
25
|
+
typer.echo(_MISSING, err=True)
|
|
26
|
+
raise typer.Exit(code=1) from None
|
|
27
|
+
raise typer.Exit(code=agent_main(list(ctx.args) or ["--help"]))
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from maskflow_cli.app import app
|
|
2
|
+
from typer.testing import CliRunner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def test_agent_passthrough_reaches_maskflow_agent() -> None:
|
|
6
|
+
result = CliRunner().invoke(app, ["agent", "--version"])
|
|
7
|
+
assert result.exit_code == 0
|
|
8
|
+
assert "maskflow-agent" in result.output
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_agent_install_writes_hooks(tmp_path, monkeypatch) -> None:
|
|
12
|
+
monkeypatch.chdir(tmp_path)
|
|
13
|
+
result = CliRunner().invoke(app, ["agent", "install", "--scope", "local"])
|
|
14
|
+
assert result.exit_code == 0, result.output
|
|
15
|
+
assert (tmp_path / ".claude" / "settings.local.json").is_file()
|
|
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
|
|
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
|