devtorch-core 3.0.1__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.
- devtorch_core/__init__.py +158 -0
- devtorch_core/aggphi_textual.py +275 -0
- devtorch_core/alerts/__init__.py +23 -0
- devtorch_core/alerts/base.py +46 -0
- devtorch_core/alerts/config.py +60 -0
- devtorch_core/alerts/dispatcher.py +110 -0
- devtorch_core/alerts/jira.py +96 -0
- devtorch_core/alerts/linear.py +72 -0
- devtorch_core/alerts/pagerduty.py +66 -0
- devtorch_core/alerts/slack.py +81 -0
- devtorch_core/alerts/teams.py +70 -0
- devtorch_core/audit/__init__.py +43 -0
- devtorch_core/audit/exporter.py +297 -0
- devtorch_core/audit/privacy.py +101 -0
- devtorch_core/audit/scrubber.py +149 -0
- devtorch_core/audit/service.py +67 -0
- devtorch_core/audit/signing.py +127 -0
- devtorch_core/broadcast/__init__.py +4 -0
- devtorch_core/broadcast/broadcaster.py +100 -0
- devtorch_core/broadcast/watcher.py +71 -0
- devtorch_core/capability.py +639 -0
- devtorch_core/cloud/__init__.py +1 -0
- devtorch_core/cloud/client_config.py +472 -0
- devtorch_core/cloud/client_configs/.claude-opencode-fallback.json +8 -0
- devtorch_core/cloud/client_configs/.claude-stdio.json +13 -0
- devtorch_core/cloud/client_configs/.cursor-mcp.json +13 -0
- devtorch_core/cloud/client_configs/.opencode-bridge.json +13 -0
- devtorch_core/cloud/client_configs/.opencode.json +15 -0
- devtorch_core/cloud/client_configs/.vscode-mcp.json +13 -0
- devtorch_core/cloud/devtorch-mcp-bridge.js +357 -0
- devtorch_core/cloud/mcp_client.py +229 -0
- devtorch_core/cloud/setup.py +144 -0
- devtorch_core/cloud/sync.py +143 -0
- devtorch_core/cloud/sync_bundle.py +603 -0
- devtorch_core/cloud/sync_conflicts.py +159 -0
- devtorch_core/cloud/sync_state.py +159 -0
- devtorch_core/cloud/team_sync.py +283 -0
- devtorch_core/codex/__init__.py +9 -0
- devtorch_core/codex/__main__.py +97 -0
- devtorch_core/codex/capture.py +208 -0
- devtorch_core/codex/proxy.py +412 -0
- devtorch_core/concept_catalog.py +209 -0
- devtorch_core/consolidation/__init__.py +3 -0
- devtorch_core/consolidation/synthesizer.py +87 -0
- devtorch_core/consolidation/workflow.py +175 -0
- devtorch_core/daemon/__init__.py +27 -0
- devtorch_core/daemon/supervisor.py +293 -0
- devtorch_core/daemon/watcher.py +244 -0
- devtorch_core/dashboard_api.py +2012 -0
- devtorch_core/deltaf.py +97 -0
- devtorch_core/disclosure.py +50 -0
- devtorch_core/divergence/__init__.py +3 -0
- devtorch_core/divergence/detector.py +166 -0
- devtorch_core/gateway/__init__.py +32 -0
- devtorch_core/gateway/key_manager.py +124 -0
- devtorch_core/gateway/metrics_webhook.py +252 -0
- devtorch_core/gateway/policy.py +262 -0
- devtorch_core/gateway/server.py +727 -0
- devtorch_core/gateway/sso.py +233 -0
- devtorch_core/gcc.py +1246 -0
- devtorch_core/github/__init__.py +35 -0
- devtorch_core/github/app.py +240 -0
- devtorch_core/github/comment_builder.py +113 -0
- devtorch_core/github/pat.py +76 -0
- devtorch_core/github/pr_parser.py +82 -0
- devtorch_core/github/pr_reporter.py +555 -0
- devtorch_core/gitlab/__init__.py +177 -0
- devtorch_core/hitl/__init__.py +4 -0
- devtorch_core/hitl/channels.py +129 -0
- devtorch_core/hitl/orchestrator.py +95 -0
- devtorch_core/hooks/__init__.py +17 -0
- devtorch_core/hooks/claude_code.py +228 -0
- devtorch_core/hooks/git_capture.py +341 -0
- devtorch_core/hooks/git_commit.py +182 -0
- devtorch_core/hooks/installer.py +733 -0
- devtorch_core/hooks/pre_commit.py +157 -0
- devtorch_core/hooks/runner.py +344 -0
- devtorch_core/identity/__init__.py +4 -0
- devtorch_core/identity/agent.py +86 -0
- devtorch_core/identity/providers.py +85 -0
- devtorch_core/invariants.py +182 -0
- devtorch_core/mcp/__init__.py +10 -0
- devtorch_core/mcp/auth.py +177 -0
- devtorch_core/mcp/server.py +1049 -0
- devtorch_core/metrics/__init__.py +35 -0
- devtorch_core/metrics/aggregate.py +215 -0
- devtorch_core/metrics/calibrate.py +198 -0
- devtorch_core/metrics/calibration.py +125 -0
- devtorch_core/metrics/credibility.py +288 -0
- devtorch_core/metrics/delivery_time.py +70 -0
- devtorch_core/metrics/dhs.py +126 -0
- devtorch_core/metrics/mcs.py +96 -0
- devtorch_core/metrics/roi.py +88 -0
- devtorch_core/metrics/session_writer.py +81 -0
- devtorch_core/metrics/shadow_ai.py +117 -0
- devtorch_core/metrics/sprint_writer.py +243 -0
- devtorch_core/observability/__init__.py +78 -0
- devtorch_core/observability/datadog.py +157 -0
- devtorch_core/observability/formatter.py +119 -0
- devtorch_core/observability/report.py +264 -0
- devtorch_core/observability/servicenow.py +147 -0
- devtorch_core/observability/splunk.py +218 -0
- devtorch_core/observability/webhook.py +227 -0
- devtorch_core/parser/__init__.py +30 -0
- devtorch_core/parser/blocks.py +216 -0
- devtorch_core/parser/inference.py +159 -0
- devtorch_core/parser/thinking.py +112 -0
- devtorch_core/projects.py +169 -0
- devtorch_core/prompt_artifact.py +76 -0
- devtorch_core/proxy/__init__.py +9 -0
- devtorch_core/proxy/routes/__init__.py +1 -0
- devtorch_core/proxy/routes/anthropic.py +264 -0
- devtorch_core/proxy/routes/azure_openai.py +336 -0
- devtorch_core/proxy/routes/gemini.py +331 -0
- devtorch_core/proxy/routes/groq.py +284 -0
- devtorch_core/proxy/routes/ollama.py +279 -0
- devtorch_core/proxy/routes/openai.py +287 -0
- devtorch_core/proxy/server.py +356 -0
- devtorch_core/query/__init__.py +15 -0
- devtorch_core/query/grep.py +181 -0
- devtorch_core/query/hybrid.py +86 -0
- devtorch_core/query/semantic.py +157 -0
- devtorch_core/rdp.py +105 -0
- devtorch_core/reasoning/__init__.py +4 -0
- devtorch_core/reasoning/entry.py +31 -0
- devtorch_core/reasoning/store.py +122 -0
- devtorch_core/reasoning_plus/__init__.py +70 -0
- devtorch_core/reasoning_plus/augmenter.py +326 -0
- devtorch_core/reasoning_plus/capture.py +51 -0
- devtorch_core/reasoning_plus/config.py +256 -0
- devtorch_core/reasoning_plus/context.py +262 -0
- devtorch_core/reasoning_plus/learning/__init__.py +72 -0
- devtorch_core/reasoning_plus/learning/analytics.py +141 -0
- devtorch_core/reasoning_plus/learning/api.py +313 -0
- devtorch_core/reasoning_plus/learning/chain.py +285 -0
- devtorch_core/reasoning_plus/learning/composer.py +74 -0
- devtorch_core/reasoning_plus/learning/cross_project.py +234 -0
- devtorch_core/reasoning_plus/learning/embeddings.py +209 -0
- devtorch_core/reasoning_plus/learning/extractor.py +207 -0
- devtorch_core/reasoning_plus/learning/models.py +116 -0
- devtorch_core/reasoning_plus/learning/provenance.py +126 -0
- devtorch_core/reasoning_plus/learning/recorder.py +81 -0
- devtorch_core/reasoning_plus/learning/relevance.py +122 -0
- devtorch_core/reasoning_plus/learning/state.py +86 -0
- devtorch_core/reasoning_plus/learning/store.py +160 -0
- devtorch_core/reasoning_plus/learning/theta_learning_bridge.py +94 -0
- devtorch_core/reasoning_plus/prompt.py +90 -0
- devtorch_core/rep.py +134 -0
- devtorch_core/rep_network/__init__.py +25 -0
- devtorch_core/rep_network/merge.py +70 -0
- devtorch_core/rep_network/node.py +137 -0
- devtorch_core/rep_network/server.py +140 -0
- devtorch_core/rep_network/sync.py +207 -0
- devtorch_core/sensitivity.py +182 -0
- devtorch_core/serve.py +258 -0
- devtorch_core/session/__init__.py +39 -0
- devtorch_core/session/disagreement.py +188 -0
- devtorch_core/session/models.py +114 -0
- devtorch_core/session/orchestrator.py +182 -0
- devtorch_core/session/planner.py +169 -0
- devtorch_core/session/simulator.py +132 -0
- devtorch_core/signing.py +290 -0
- devtorch_core/sis.py +197 -0
- devtorch_core/storage.py +308 -0
- devtorch_core/templates/__init__.py +6 -0
- devtorch_core/templates/engine.py +122 -0
- devtorch_core/templates/go.py +18 -0
- devtorch_core/templates/infra.py +19 -0
- devtorch_core/templates/library/__init__.py +18 -0
- devtorch_core/templates/library/api_design.md +27 -0
- devtorch_core/templates/library/bug_fix.md +27 -0
- devtorch_core/templates/library/decision_record.md +27 -0
- devtorch_core/templates/library/engine.py +228 -0
- devtorch_core/templates/library/security_review.md +30 -0
- devtorch_core/templates/python.py +19 -0
- devtorch_core/templates/react.py +18 -0
- devtorch_core/templates/typescript.py +18 -0
- devtorch_core/theta.py +221 -0
- devtorch_core/theta_synthesis.py +268 -0
- devtorch_core/topics.py +320 -0
- devtorch_core/variance.py +219 -0
- devtorch_core/wrapper/__init__.py +52 -0
- devtorch_core/wrapper/anthropic.py +487 -0
- devtorch_core/wrapper/base.py +562 -0
- devtorch_core/wrapper/bedrock.py +342 -0
- devtorch_core/wrapper/gemini.py +422 -0
- devtorch_core/wrapper/ollama.py +527 -0
- devtorch_core/wrapper/openai.py +461 -0
- devtorch_core-3.0.1.dist-info/METADATA +867 -0
- devtorch_core-3.0.1.dist-info/RECORD +193 -0
- devtorch_core-3.0.1.dist-info/WHEEL +5 -0
- devtorch_core-3.0.1.dist-info/entry_points.txt +2 -0
- devtorch_core-3.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Sprint 4 – A2/I2 Byzantine safety: parameterised f_max and variance calibration.
|
|
3
|
+
|
|
4
|
+
f_max(n, σ²_obs) = floor(n * (1 - 2*σ²_obs) / 3). Variance calibration produces
|
|
5
|
+
a report (σ² per agent, σ²_obs, f_max). Rolling monitoring can emit VARIANCE_ALERT
|
|
6
|
+
when f_max drops; when f_max_live=0, deterministic mode is forced.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import json
|
|
12
|
+
from dataclasses import dataclass
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
from typing import Dict, Optional
|
|
15
|
+
|
|
16
|
+
VARIANCE_ALERT_EVENT = "VARIANCE_ALERT"
|
|
17
|
+
LIVE_STATE_FILE = "live_state.json"
|
|
18
|
+
|
|
19
|
+
VARIANCE_DIR_NAME = "variance"
|
|
20
|
+
VARIANCE_REPORT_FILE = "calibration_report.json"
|
|
21
|
+
SIGMA_SQ_MAX_DEFAULT = 0.3 # Exclude peers with σ²_j > σ²_max
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def f_max(n: int, sigma_sq_obs: float) -> int:
|
|
25
|
+
"""
|
|
26
|
+
Parameterised Byzantine bound: max tolerable faulty agents.
|
|
27
|
+
f_max(n, σ²_obs) = floor(n * (1 - 2*σ²_obs) / 3).
|
|
28
|
+
"""
|
|
29
|
+
if n <= 0:
|
|
30
|
+
return 0
|
|
31
|
+
if sigma_sq_obs >= 0.5:
|
|
32
|
+
return 0
|
|
33
|
+
return max(0, int(n * (1.0 - 2.0 * sigma_sq_obs) / 3.0))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@dataclass
|
|
37
|
+
class VarianceReport:
|
|
38
|
+
"""Result of a variance calibration run."""
|
|
39
|
+
sigma_sq_per_agent: Dict[str, float]
|
|
40
|
+
sigma_sq_obs: float
|
|
41
|
+
n: int
|
|
42
|
+
f_max: int
|
|
43
|
+
sigma_sq_max: float = SIGMA_SQ_MAX_DEFAULT
|
|
44
|
+
|
|
45
|
+
def to_dict(self) -> dict:
|
|
46
|
+
return {
|
|
47
|
+
"sigma_sq_per_agent": self.sigma_sq_per_agent,
|
|
48
|
+
"sigma_sq_obs": self.sigma_sq_obs,
|
|
49
|
+
"n": self.n,
|
|
50
|
+
"f_max": self.f_max,
|
|
51
|
+
"sigma_sq_max": self.sigma_sq_max,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_dict(cls, d: dict) -> "VarianceReport":
|
|
56
|
+
return cls(
|
|
57
|
+
sigma_sq_per_agent=dict(d.get("sigma_sq_per_agent", {})),
|
|
58
|
+
sigma_sq_obs=float(d.get("sigma_sq_obs", 0)),
|
|
59
|
+
n=int(d.get("n", 0)),
|
|
60
|
+
f_max=int(d.get("f_max", 0)),
|
|
61
|
+
sigma_sq_max=float(d.get("sigma_sq_max", SIGMA_SQ_MAX_DEFAULT)),
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def variance_calibrate(agent_variances: Dict[str, float]) -> VarianceReport:
|
|
66
|
+
"""
|
|
67
|
+
Compute σ²_obs = (1/n) * sum(σ²_i), then f_max(n, σ²_obs).
|
|
68
|
+
"""
|
|
69
|
+
n = len(agent_variances)
|
|
70
|
+
if n == 0:
|
|
71
|
+
return VarianceReport(
|
|
72
|
+
sigma_sq_per_agent={},
|
|
73
|
+
sigma_sq_obs=0.0,
|
|
74
|
+
n=0,
|
|
75
|
+
f_max=0,
|
|
76
|
+
)
|
|
77
|
+
sigma_sq_obs = sum(agent_variances.values()) / n
|
|
78
|
+
return VarianceReport(
|
|
79
|
+
sigma_sq_per_agent=dict(agent_variances),
|
|
80
|
+
sigma_sq_obs=sigma_sq_obs,
|
|
81
|
+
n=n,
|
|
82
|
+
f_max=f_max(n, sigma_sq_obs),
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def reputation_with_variance_penalty(
|
|
87
|
+
base_reputation: float,
|
|
88
|
+
sigma_sq_j: float,
|
|
89
|
+
sigma_sq_max: float = SIGMA_SQ_MAX_DEFAULT,
|
|
90
|
+
alpha: float = 0.5,
|
|
91
|
+
) -> float:
|
|
92
|
+
"""
|
|
93
|
+
Penalise reputation by variance: r_new = (1-α)*r_old + α * (1 - σ²_j/σ²_max).
|
|
94
|
+
If σ²_j > σ²_max, the peer should be excluded (return 0 or very low).
|
|
95
|
+
"""
|
|
96
|
+
if sigma_sq_j >= sigma_sq_max:
|
|
97
|
+
return 0.0
|
|
98
|
+
variance_factor = 1.0 - (sigma_sq_j / sigma_sq_max)
|
|
99
|
+
return (1.0 - alpha) * base_reputation + alpha * variance_factor
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
@dataclass
|
|
103
|
+
class VarianceMonitorResult:
|
|
104
|
+
"""Result of a variance rolling monitor run."""
|
|
105
|
+
f_max_live: int
|
|
106
|
+
previous_f_max: Optional[int]
|
|
107
|
+
sigma_sq_obs: float
|
|
108
|
+
alert_emitted: bool
|
|
109
|
+
deterministic_mode_forced: bool
|
|
110
|
+
|
|
111
|
+
def to_dict(self) -> dict:
|
|
112
|
+
return {
|
|
113
|
+
"f_max_live": self.f_max_live,
|
|
114
|
+
"previous_f_max": self.previous_f_max,
|
|
115
|
+
"sigma_sq_obs": self.sigma_sq_obs,
|
|
116
|
+
"alert_emitted": self.alert_emitted,
|
|
117
|
+
"deterministic_mode_forced": self.deterministic_mode_forced,
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def _now_iso() -> str:
|
|
122
|
+
import datetime
|
|
123
|
+
return datetime.datetime.now(datetime.timezone.utc).isoformat()
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def run_variance_monitor(
|
|
127
|
+
gcc_dir: Path,
|
|
128
|
+
agent_variances: Optional[Dict[str, float]] = None,
|
|
129
|
+
) -> VarianceMonitorResult:
|
|
130
|
+
"""
|
|
131
|
+
Run rolling variance monitoring: compute current f_max (from fresh calibration
|
|
132
|
+
or last report), compare to previous, and persist live state.
|
|
133
|
+
- If f_max_live == 0 or f_max_live < previous_f_max, caller should emit VARIANCE_ALERT.
|
|
134
|
+
- When f_max_live == 0, deterministic_mode_forced is True (force deterministic mode).
|
|
135
|
+
"""
|
|
136
|
+
store = VarianceStore(gcc_dir)
|
|
137
|
+
store.variance_dir.mkdir(parents=True, exist_ok=True)
|
|
138
|
+
live_path = store.variance_dir / LIVE_STATE_FILE
|
|
139
|
+
|
|
140
|
+
# Current report: from fresh calibration or last persisted report
|
|
141
|
+
if agent_variances is not None and len(agent_variances) > 0:
|
|
142
|
+
report = variance_calibrate(agent_variances)
|
|
143
|
+
else:
|
|
144
|
+
report = store.load_report()
|
|
145
|
+
if report is None:
|
|
146
|
+
report = VarianceReport(
|
|
147
|
+
sigma_sq_per_agent={},
|
|
148
|
+
sigma_sq_obs=0.0,
|
|
149
|
+
n=0,
|
|
150
|
+
f_max=0,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
f_max_live = report.f_max
|
|
154
|
+
previous_f_max: Optional[int] = None
|
|
155
|
+
if live_path.exists():
|
|
156
|
+
try:
|
|
157
|
+
live = json.loads(live_path.read_text(encoding="utf-8"))
|
|
158
|
+
previous_f_max = live.get("last_f_max")
|
|
159
|
+
except (json.JSONDecodeError, OSError):
|
|
160
|
+
pass
|
|
161
|
+
|
|
162
|
+
alert_emitted = (
|
|
163
|
+
f_max_live == 0
|
|
164
|
+
or (previous_f_max is not None and f_max_live < previous_f_max)
|
|
165
|
+
)
|
|
166
|
+
deterministic_mode_forced = f_max_live == 0
|
|
167
|
+
|
|
168
|
+
now = _now_iso()
|
|
169
|
+
live_state = {
|
|
170
|
+
"last_f_max": f_max_live,
|
|
171
|
+
"last_sigma_sq_obs": report.sigma_sq_obs,
|
|
172
|
+
"last_checked_at": now,
|
|
173
|
+
"deterministic_mode_forced": deterministic_mode_forced,
|
|
174
|
+
}
|
|
175
|
+
live_path.write_text(json.dumps(live_state, indent=2) + "\n", encoding="utf-8")
|
|
176
|
+
|
|
177
|
+
return VarianceMonitorResult(
|
|
178
|
+
f_max_live=f_max_live,
|
|
179
|
+
previous_f_max=previous_f_max,
|
|
180
|
+
sigma_sq_obs=report.sigma_sq_obs,
|
|
181
|
+
alert_emitted=alert_emitted,
|
|
182
|
+
deterministic_mode_forced=deterministic_mode_forced,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def load_variance_live_state(gcc_dir: Path) -> Optional[dict]:
|
|
187
|
+
"""Load variance live_state.json if present; None otherwise."""
|
|
188
|
+
path = gcc_dir / VARIANCE_DIR_NAME / LIVE_STATE_FILE
|
|
189
|
+
if not path.exists():
|
|
190
|
+
return None
|
|
191
|
+
try:
|
|
192
|
+
return json.loads(path.read_text(encoding="utf-8"))
|
|
193
|
+
except (json.JSONDecodeError, OSError):
|
|
194
|
+
return None
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def variance_deterministic_mode_forced(gcc_dir: Path) -> bool:
|
|
198
|
+
"""True when f_max_live was 0 at last monitor run (A2: force deterministic mode)."""
|
|
199
|
+
live = load_variance_live_state(gcc_dir)
|
|
200
|
+
return bool(live and live.get("deterministic_mode_forced"))
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class VarianceStore:
|
|
204
|
+
"""Persist and load variance calibration report under .GCC/variance/."""
|
|
205
|
+
def __init__(self, gcc_dir: Path) -> None:
|
|
206
|
+
self.variance_dir = gcc_dir / VARIANCE_DIR_NAME
|
|
207
|
+
self.report_path = self.variance_dir / VARIANCE_REPORT_FILE
|
|
208
|
+
|
|
209
|
+
def save_report(self, report: VarianceReport) -> None:
|
|
210
|
+
self.variance_dir.mkdir(parents=True, exist_ok=True)
|
|
211
|
+
self.report_path.write_text(
|
|
212
|
+
json.dumps(report.to_dict(), indent=2) + "\n",
|
|
213
|
+
encoding="utf-8",
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
def load_report(self) -> Optional[VarianceReport]:
|
|
217
|
+
if not self.report_path.exists():
|
|
218
|
+
return None
|
|
219
|
+
return VarianceReport.from_dict(json.loads(self.report_path.read_text(encoding="utf-8")))
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""
|
|
2
|
+
devtorch_core.wrapper
|
|
3
|
+
=====================
|
|
4
|
+
LLM SDK wrapper layer (S7).
|
|
5
|
+
|
|
6
|
+
Provides drop-in replacements for popular LLM SDK clients that transparently:
|
|
7
|
+
|
|
8
|
+
1. Inject RACP context (system prompt + Θ coordination vector + context bundle)
|
|
9
|
+
into every LLM call.
|
|
10
|
+
2. Capture reasoning (thinking blocks, RACP-tagged blocks) to the local .GCC/
|
|
11
|
+
reasoning store.
|
|
12
|
+
3. Return clean, block-stripped responses to the caller.
|
|
13
|
+
4. Degrade gracefully — if .GCC/ is missing or any DevTorch primitive fails,
|
|
14
|
+
a warning is logged and the LLM response is returned as-is.
|
|
15
|
+
|
|
16
|
+
Quick start
|
|
17
|
+
-----------
|
|
18
|
+
::
|
|
19
|
+
|
|
20
|
+
# Anthropic
|
|
21
|
+
from devtorch_core.wrapper.anthropic import DevTorchAnthropic as Anthropic
|
|
22
|
+
|
|
23
|
+
# OpenAI
|
|
24
|
+
from devtorch_core.wrapper.openai import DevTorchOpenAI as OpenAI
|
|
25
|
+
|
|
26
|
+
# Google Gemini
|
|
27
|
+
from devtorch_core.wrapper.gemini import DevTorchGemini
|
|
28
|
+
|
|
29
|
+
# AWS Bedrock (Anthropic Claude)
|
|
30
|
+
from devtorch_core.wrapper.bedrock import DevTorchBedrock
|
|
31
|
+
|
|
32
|
+
Environment variables
|
|
33
|
+
---------------------
|
|
34
|
+
DEVTORCH_DISABLE=1 Disable all injection and capture (pass-through mode).
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
from .anthropic import DevTorchAnthropic
|
|
38
|
+
from .openai import DevTorchOpenAI
|
|
39
|
+
from .gemini import DevTorchGemini
|
|
40
|
+
from .bedrock import DevTorchBedrock
|
|
41
|
+
from .base import RACPInjector, CaptureOrchestrator, find_gcc_repo, is_disabled
|
|
42
|
+
|
|
43
|
+
__all__ = [
|
|
44
|
+
"DevTorchAnthropic",
|
|
45
|
+
"DevTorchOpenAI",
|
|
46
|
+
"DevTorchGemini",
|
|
47
|
+
"DevTorchBedrock",
|
|
48
|
+
"RACPInjector",
|
|
49
|
+
"CaptureOrchestrator",
|
|
50
|
+
"find_gcc_repo",
|
|
51
|
+
"is_disabled",
|
|
52
|
+
]
|