forgexa-cli 1.66.1__tar.gz → 1.66.3__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.
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/PKG-INFO +1 -1
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli/__init__.py +1 -1
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli/aws_evidence.py +25 -9
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli/daemon.py +1 -1
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli.egg-info/PKG-INFO +1 -1
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/pyproject.toml +1 -1
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/README.md +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli/_build_config.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli/_local_bind.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli/agent_core.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli/autoupgrade.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli/main.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli/py.typed +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli/runtime_evidence.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli/zcode_protocol.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli.egg-info/SOURCES.txt +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli.egg-info/dependency_links.txt +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli.egg-info/entry_points.txt +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli.egg-info/requires.txt +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/forgexa_cli.egg-info/top_level.txt +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/setup.cfg +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/tests/test_auth_and_runtime_commands.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/tests/test_autoupgrade.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/tests/test_check_command.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/tests/test_expiry_warnings_and_revoke.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/tests/test_local_bind_commands.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/tests/test_runtime_credentials.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/tests/test_session_credentials.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/tests/test_silent_install.py +0 -0
- {forgexa_cli-1.66.1 → forgexa_cli-1.66.3}/tests/test_upgrade_observability.py +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""forgexa-cli — Forgexa command-line client."""
|
|
2
|
-
__version__ = "1.66.
|
|
2
|
+
__version__ = "1.66.3"
|
|
@@ -35,6 +35,8 @@ SECRET_FIELDS = frozenset(
|
|
|
35
35
|
}
|
|
36
36
|
)
|
|
37
37
|
|
|
38
|
+
EVIDENCE_PROTOCOL_VERSION = 2
|
|
39
|
+
|
|
38
40
|
MODEL_ENDPOINT_KEYS = {
|
|
39
41
|
"claude": ("ANTHROPIC_BASE_URL",),
|
|
40
42
|
"mimo": ("ANTHROPIC_BASE_URL",),
|
|
@@ -55,7 +57,7 @@ MODEL_PROVIDER_LABELS = {
|
|
|
55
57
|
"tencent": "Tencent / CodeBuddy",
|
|
56
58
|
"qoder": "Qoder",
|
|
57
59
|
"bytedance": "ByteDance / Trae",
|
|
58
|
-
"zhipu": "Z.ai
|
|
60
|
+
"zhipu": "Zhipu / Z.ai",
|
|
59
61
|
}
|
|
60
62
|
AGENT_MODEL_PROVIDERS = {
|
|
61
63
|
"claude": ("Claude Code", "anthropic"),
|
|
@@ -78,10 +80,14 @@ def provider_catalog() -> dict:
|
|
|
78
80
|
agents = [{"agent_id": agent_id, "label": label, "provider": provider,
|
|
79
81
|
"evidence_supported": agent_id in MODEL_ENDPOINT_KEYS}
|
|
80
82
|
for agent_id, (label, provider) in AGENT_MODEL_PROVIDERS.items()]
|
|
81
|
-
|
|
83
|
+
providers = [{"value": provider, "label": label,
|
|
82
84
|
"agent_ids": [agent["agent_id"] for agent in agents if agent["provider"] == provider],
|
|
83
85
|
"evidence_supported": any(agent["provider"] == provider and agent["evidence_supported"] for agent in agents)}
|
|
84
|
-
for provider, label in MODEL_PROVIDER_LABELS.items()]
|
|
86
|
+
for provider, label in MODEL_PROVIDER_LABELS.items()]
|
|
87
|
+
zhipu = next(provider for provider in providers if provider["value"] == "zhipu")
|
|
88
|
+
zhipu["agent_ids"].insert(0, "claude")
|
|
89
|
+
zhipu["evidence_supported"] = True
|
|
90
|
+
return {"agents": agents, "providers": providers}
|
|
85
91
|
|
|
86
92
|
|
|
87
93
|
class EvidenceError(ValueError):
|
|
@@ -132,6 +138,7 @@ def model_destination(driver_id: str, environment: dict) -> dict:
|
|
|
132
138
|
"api.moonshot.ai": "moonshot",
|
|
133
139
|
"api.xiaomimimo.com": "xiaomi",
|
|
134
140
|
"api.deepseek.com": "deepseek",
|
|
141
|
+
"open.bigmodel.cn": "zhipu",
|
|
135
142
|
}
|
|
136
143
|
provider = known_hosts.get(parsed.hostname or "")
|
|
137
144
|
if (
|
|
@@ -140,6 +147,8 @@ def model_destination(driver_id: str, environment: dict) -> dict:
|
|
|
140
147
|
or parsed.password
|
|
141
148
|
or not provider
|
|
142
149
|
or parsed.port not in (None, 443)
|
|
150
|
+
or (provider == "zhipu" and (driver_id != "claude"
|
|
151
|
+
or parsed.path.rstrip("/") != "/api/anthropic" or parsed.query or parsed.fragment))
|
|
143
152
|
):
|
|
144
153
|
raise EvidenceError("aws_evidence_unknown_provider")
|
|
145
154
|
return {"model_provider": provider, "endpoint": endpoint.rstrip("/")}
|
|
@@ -185,7 +194,18 @@ def _reject_constant(value: str) -> None:
|
|
|
185
194
|
raise EvidenceError("aws_evidence_invalid_payload")
|
|
186
195
|
|
|
187
196
|
|
|
188
|
-
def
|
|
197
|
+
def agent_transfer_allowed(policy: Any, model_provider: str | None = None) -> bool:
|
|
198
|
+
if not isinstance(policy, dict) or policy.get("allow_agent_transfer") is not True:
|
|
199
|
+
return False
|
|
200
|
+
mode = policy.get("approval_mode", "provider_allowlist")
|
|
201
|
+
if mode == "user_consent":
|
|
202
|
+
return True
|
|
203
|
+
return bool(mode == "provider_allowlist" and model_provider
|
|
204
|
+
and isinstance(policy.get("allowed_model_providers"), list)
|
|
205
|
+
and model_provider in policy["allowed_model_providers"])
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def validate_payload(reference: Any, metadata: Any, payload: Any, model_provider: str | None = None) -> dict:
|
|
189
209
|
reference = validate_reference(reference)
|
|
190
210
|
if not isinstance(payload, str) or len(payload.encode("utf-8")) > PAYLOAD_MAX_BYTES:
|
|
191
211
|
raise EvidenceError("aws_evidence_size_limit")
|
|
@@ -198,11 +218,7 @@ def validate_payload(reference: Any, metadata: Any, payload: Any, model_provider
|
|
|
198
218
|
raise EvidenceError("aws_evidence_identity_mismatch")
|
|
199
219
|
policy = metadata.get("data_policy")
|
|
200
220
|
if (
|
|
201
|
-
not
|
|
202
|
-
or policy.get("allow_agent_transfer") is not True
|
|
203
|
-
or not isinstance(policy.get("allowed_model_providers"), list)
|
|
204
|
-
or not model_provider
|
|
205
|
-
or model_provider not in policy.get("allowed_model_providers", [])
|
|
221
|
+
not agent_transfer_allowed(policy, model_provider)
|
|
206
222
|
or type(policy.get("policy_version")) is not int
|
|
207
223
|
or policy["policy_version"] < 1
|
|
208
224
|
):
|
|
@@ -1234,7 +1234,7 @@ except (ImportError, ModuleNotFoundError):
|
|
|
1234
1234
|
# DAEMON_VERSION is the protocol/logic version of the daemon code.
|
|
1235
1235
|
# Kept in sync with pyproject.toml version via bump-version.sh.
|
|
1236
1236
|
# CLIENT_TYPE identifies which packaging/distribution this daemon runs in.
|
|
1237
|
-
DAEMON_VERSION = "1.66.
|
|
1237
|
+
DAEMON_VERSION = "1.66.3"
|
|
1238
1238
|
|
|
1239
1239
|
|
|
1240
1240
|
def _detect_client_type() -> str:
|
|
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
|