conduct-cli 0.7.41__tar.gz → 0.7.42__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.
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/PKG-INFO +1 -1
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/pyproject.toml +1 -1
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/guard.py +8 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/hooks/session_start.py +29 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli.egg-info/PKG-INFO +1 -1
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/README.md +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/setup.cfg +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/setup.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/__init__.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/api.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/guardmcp.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/hooks/__init__.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/hooks/base.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/hooks/posttooluse.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/hooks/precompact.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/hooks/pretooluse.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/hooks/session_parser.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/hooks/session_report_push.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/hooks/stop.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/log_util.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/main.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/mcp_server.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/memory.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/paxel.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli/tool_groups.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli.egg-info/entry_points.txt +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli.egg-info/requires.txt +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/src/conduct_cli.egg-info/top_level.txt +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_advisory_and_hook.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_api_client.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_bash_operator_signature.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_blast_radius.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_cmd_run.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_command_word_matcher.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_drain_daemon_health.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_guard_policy.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_guard_savings.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_hook_dispatch.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_journal_drain.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_log_util.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_proxy_coverage.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_proxy_env.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_signed_policy.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_switch.py +0 -0
- {conduct_cli-0.7.41 → conduct_cli-0.7.42}/tests/test_token_lifecycle.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "conduct-cli"
|
|
7
|
-
version = "0.7.
|
|
7
|
+
version = "0.7.42"
|
|
8
8
|
description = "CLI for Conduct AI — secure, govern, install agents, manage projects, run tests"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -1376,6 +1376,14 @@ def cmd_guard_sync(args):
|
|
|
1376
1376
|
except Exception as e:
|
|
1377
1377
|
print(f" {YELLOW}Warning: could not refresh token ({e}) — using cached value{RESET}")
|
|
1378
1378
|
|
|
1379
|
+
# Fetch team instructions version so session-start hook can detect staleness
|
|
1380
|
+
try:
|
|
1381
|
+
ver_resp = _req("GET", f"{base_url}/team-os/instructions/version", token=_token)
|
|
1382
|
+
if ver_resp.get("version"):
|
|
1383
|
+
_save_guard_config({"instructions_version": ver_resp["version"]})
|
|
1384
|
+
except Exception:
|
|
1385
|
+
pass # non-fatal
|
|
1386
|
+
|
|
1379
1387
|
# Write LLM proxy env vars so any AI tool (Claude Code, Cursor, Codex, …)
|
|
1380
1388
|
# routes through Conduct Guard. Customer-overridable via --proxy-url or
|
|
1381
1389
|
# CONDUCT_PROXY_URL env var; otherwise fetched from server (workspace_config).
|
|
@@ -57,6 +57,34 @@ def _check_proxy_token() -> None:
|
|
|
57
57
|
pass
|
|
58
58
|
|
|
59
59
|
|
|
60
|
+
def _check_instructions_staleness() -> None:
|
|
61
|
+
"""Warn if team AI instructions have been updated since last sync.
|
|
62
|
+
|
|
63
|
+
Reads local instructions_version from config, hits GET /team-os/instructions/version,
|
|
64
|
+
prints one-line warning if stale. Timeout 2s — never blocks the session.
|
|
65
|
+
"""
|
|
66
|
+
try:
|
|
67
|
+
import urllib.request as _req
|
|
68
|
+
cfg = load_config()
|
|
69
|
+
api_url = cfg.get("api_url", "https://api.conductai.ai").rstrip("/")
|
|
70
|
+
agent_token = cfg.get("agent_token", "")
|
|
71
|
+
local_version = cfg.get("instructions_version")
|
|
72
|
+
if not agent_token or not local_version:
|
|
73
|
+
return # not synced yet — nothing to compare
|
|
74
|
+
|
|
75
|
+
request = _req.Request(
|
|
76
|
+
f"{api_url}/team-os/instructions/version",
|
|
77
|
+
headers={"Authorization": f"Bearer {agent_token}"},
|
|
78
|
+
)
|
|
79
|
+
with _req.urlopen(request, timeout=2) as resp:
|
|
80
|
+
data = json.loads(resp.read())
|
|
81
|
+
remote_version = data.get("version")
|
|
82
|
+
if remote_version and remote_version != local_version:
|
|
83
|
+
print(f"⚠ Team AI instructions updated ({local_version} → {remote_version}) — run `conduct guard sync` to pull latest\n")
|
|
84
|
+
except Exception:
|
|
85
|
+
pass # always silent — session-start must never fail
|
|
86
|
+
|
|
87
|
+
|
|
60
88
|
def _backfill_prev_session(current_session_id: str, cwd: str | None) -> None:
|
|
61
89
|
"""Parse + PATCH the most recent completed session (the one that just ended).
|
|
62
90
|
|
|
@@ -155,6 +183,7 @@ def main() -> None:
|
|
|
155
183
|
pass
|
|
156
184
|
|
|
157
185
|
_check_proxy_token()
|
|
186
|
+
_check_instructions_staleness()
|
|
158
187
|
|
|
159
188
|
if not SNAPSHOT_PATH.exists():
|
|
160
189
|
sys.exit(0)
|
|
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
|