millforge 0.1.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.
Files changed (116) hide show
  1. millforge/__init__.py +1174 -0
  2. millforge/_forge/LICENSE +21 -0
  3. millforge/_forge/PROVENANCE.json +295 -0
  4. millforge/_forge/UPDATE_POLICY.md +24 -0
  5. millforge/_forge/__init__.py +14 -0
  6. millforge/_forge/adapter.py +2232 -0
  7. millforge/_forge/base_runner.py +121 -0
  8. millforge/_forge/clients/__init__.py +10 -0
  9. millforge/_forge/clients/base.py +200 -0
  10. millforge/_forge/context/__init__.py +23 -0
  11. millforge/_forge/context/manager.py +178 -0
  12. millforge/_forge/context/strategies.py +335 -0
  13. millforge/_forge/core/__init__.py +16 -0
  14. millforge/_forge/core/inference.py +433 -0
  15. millforge/_forge/core/messages.py +119 -0
  16. millforge/_forge/core/runner.py +479 -0
  17. millforge/_forge/core/steps.py +108 -0
  18. millforge/_forge/core/workflow.py +400 -0
  19. millforge/_forge/errors.py +222 -0
  20. millforge/_forge/guardrails/__init__.py +21 -0
  21. millforge/_forge/guardrails/error_tracker.py +71 -0
  22. millforge/_forge/guardrails/guardrails.py +194 -0
  23. millforge/_forge/guardrails/nudge.py +47 -0
  24. millforge/_forge/guardrails/response_validator.py +119 -0
  25. millforge/_forge/guardrails/step_enforcer.py +183 -0
  26. millforge/_forge/prompts/__init__.py +16 -0
  27. millforge/_forge/prompts/nudges.py +95 -0
  28. millforge/_forge/prompts/templates.py +285 -0
  29. millforge/_version.py +3 -0
  30. millforge/artifacts.py +570 -0
  31. millforge/base/__init__.py +97 -0
  32. millforge/base/composition.py +402 -0
  33. millforge/base/context.py +285 -0
  34. millforge/base/harness.py +138 -0
  35. millforge/base/identity.py +465 -0
  36. millforge/base/options.py +34 -0
  37. millforge/base/platform.py +17 -0
  38. millforge/base/prompt.py +317 -0
  39. millforge/base/runner.py +546 -0
  40. millforge/compiled_plan.py +970 -0
  41. millforge/compiler/__init__.py +231 -0
  42. millforge/compiler/artifact_validation.py +257 -0
  43. millforge/compiler/canonicalization.py +169 -0
  44. millforge/compiler/capabilities.py +66 -0
  45. millforge/compiler/catalogs.py +500 -0
  46. millforge/compiler/diagnostics.py +491 -0
  47. millforge/compiler/graph.py +678 -0
  48. millforge/compiler/lowering.py +198 -0
  49. millforge/compiler/output.py +692 -0
  50. millforge/compiler/parsing.py +1424 -0
  51. millforge/compiler/requests.py +1180 -0
  52. millforge/compiler/schema_validation.py +272 -0
  53. millforge/compiler/semantic.py +490 -0
  54. millforge/compiler/service.py +448 -0
  55. millforge/compiler/source.py +375 -0
  56. millforge/compiler/validators.py +184 -0
  57. millforge/connectors/__init__.py +95 -0
  58. millforge/connectors/admission.py +801 -0
  59. millforge/connectors/broker.py +202 -0
  60. millforge/connectors/contracts.py +1159 -0
  61. millforge/connectors/diagnostics.py +189 -0
  62. millforge/connectors/fake.py +66 -0
  63. millforge/connectors/runtime.py +236 -0
  64. millforge/contracts.py +2860 -0
  65. millforge/custom_tools/__init__.py +67 -0
  66. millforge/custom_tools/compiler.py +724 -0
  67. millforge/custom_tools/contracts.py +1093 -0
  68. millforge/custom_tools/diagnostics.py +205 -0
  69. millforge/eval_artifacts.py +952 -0
  70. millforge/eval_boundary.py +2435 -0
  71. millforge/eval_fixtures/__init__.py +1 -0
  72. millforge/eval_fixtures/default_pack/__init__.py +1 -0
  73. millforge/eval_fixtures/default_pack/fixtures/fixture.08a.bug_diagnosis.traceback.v1.json +52 -0
  74. millforge/eval_fixtures/default_pack/fixtures/fixture.08a.direct_edit.import_sort.v1.json +52 -0
  75. millforge/eval_fixtures/default_pack/fixtures/fixture.08a.evidence_discipline.no_source_change.v1.json +51 -0
  76. millforge/eval_fixtures/default_pack/fixtures/fixture.08a.false_closure.visible_green.v1.json +52 -0
  77. millforge/eval_fixtures/default_pack/fixtures/fixture.08a.multi_file.api_contract.v1.json +54 -0
  78. millforge/eval_fixtures/default_pack/fixtures/fixture.08a.recovery.malformed_artifact.v1.json +54 -0
  79. millforge/eval_fixtures/default_pack/manifest.json +12 -0
  80. millforge/eval_modes.py +1282 -0
  81. millforge/eval_presets.py +1398 -0
  82. millforge/eval_reports.py +2517 -0
  83. millforge/eval_suite.py +2429 -0
  84. millforge/eval_trials.py +2632 -0
  85. millforge/eval_workflow.py +794 -0
  86. millforge/exceptions.py +122 -0
  87. millforge/model_backend.py +2098 -0
  88. millforge/protocols.py +340 -0
  89. millforge/py.typed +0 -0
  90. millforge/runtime.py +1791 -0
  91. millforge/testing/__init__.py +1089 -0
  92. millforge/tools/__init__.py +83 -0
  93. millforge/tools/builtin_runtime.py +1339 -0
  94. millforge/tools/builtins.py +773 -0
  95. millforge/tools/execution.py +1545 -0
  96. millforge/tools/path_policy.py +155 -0
  97. millforge/tools/pi_compat/PI_LICENSE +21 -0
  98. millforge/tools/pi_compat/PROVENANCE.json +55 -0
  99. millforge/tools/pi_compat/UPDATE_POLICY.md +36 -0
  100. millforge/tools/pi_compat/__init__.py +34 -0
  101. millforge/tools/pi_compat/contracts.py +49 -0
  102. millforge/tools/pi_compat/editing.py +390 -0
  103. millforge/tools/pi_compat/mutations.py +57 -0
  104. millforge/tools/pi_compat/operations.py +401 -0
  105. millforge/tools/pi_compat/paths.py +155 -0
  106. millforge/tools/pi_compat/process.py +1375 -0
  107. millforge/tools/pi_compat/search.py +738 -0
  108. millforge/tools/pi_compat/truncation.py +267 -0
  109. millforge/tools/pi_compat_catalog.py +396 -0
  110. millforge/tools/pi_compat_runtime.py +460 -0
  111. millforge/tools/registry.py +553 -0
  112. millforge/tools/results.py +533 -0
  113. millforge-0.1.0.dist-info/METADATA +844 -0
  114. millforge-0.1.0.dist-info/RECORD +116 -0
  115. millforge-0.1.0.dist-info/WHEEL +4 -0
  116. millforge-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 Antoine Zambelli
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,295 @@
1
+ {
2
+ "manifest_version": 1,
3
+ "upstream": {
4
+ "name": "forge-guardrails",
5
+ "url": "https://github.com/antoinezambelli/forge",
6
+ "commit": "bd99f4df0a7aab2fd4db2e6dae7f810a32617d76",
7
+ "package_version": "0.7.4",
8
+ "license": "MIT",
9
+ "copyright": "Copyright (c) 2025-2026 Antoine Zambelli"
10
+ },
11
+ "import_date": "2026-06-12",
12
+ "source_snapshot": "ref-forge/",
13
+ "copied_files": [
14
+ {
15
+ "upstream_path": "src/forge/errors.py",
16
+ "sha256_before_namespace_edits": "9a0b5409b0f81588cbd4e410f19781db42472eb4e2e7df06dde6ab015f272d40",
17
+ "private_destination": "src/millforge/_forge/errors.py",
18
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
19
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
20
+ },
21
+ {
22
+ "upstream_path": "src/forge/clients/base.py",
23
+ "sha256_before_namespace_edits": "db4bdf33da769acde686093e42bb62e3f586910ba23eb6632698b09e85f40de5",
24
+ "private_destination": "src/millforge/_forge/clients/base.py",
25
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
26
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
27
+ },
28
+ {
29
+ "upstream_path": "src/forge/context/manager.py",
30
+ "sha256_before_namespace_edits": "934173f7912eda253cad788528cc0409ce851da825ca1753b9e9e65c5e7cd15d",
31
+ "private_destination": "src/millforge/_forge/context/manager.py",
32
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
33
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
34
+ },
35
+ {
36
+ "upstream_path": "src/forge/context/strategies.py",
37
+ "sha256_before_namespace_edits": "c9b618ae7ac3f66ac34febf24b943ed441645f1b703cac51cbe80f569576f526",
38
+ "private_destination": "src/millforge/_forge/context/strategies.py",
39
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
40
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
41
+ },
42
+ {
43
+ "upstream_path": "src/forge/core/workflow.py",
44
+ "sha256_before_namespace_edits": "e5baad6aac152a2625a9bdccf164d32e476ce5a02b9e47be2e4640f6c1ad4862",
45
+ "private_destination": "src/millforge/_forge/core/workflow.py",
46
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
47
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
48
+ },
49
+ {
50
+ "upstream_path": "src/forge/core/messages.py",
51
+ "sha256_before_namespace_edits": "41ce4e4cd9d1776ed13491158ca64bb6e6dcb633faf686a8ed6e002602ae5a3e",
52
+ "private_destination": "src/millforge/_forge/core/messages.py",
53
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
54
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
55
+ },
56
+ {
57
+ "upstream_path": "src/forge/core/steps.py",
58
+ "sha256_before_namespace_edits": "aeeef79fa1d78770203346c163786715fc5f08b7e223794ce70031d0656c9d4c",
59
+ "private_destination": "src/millforge/_forge/core/steps.py",
60
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
61
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
62
+ },
63
+ {
64
+ "upstream_path": "src/forge/core/inference.py",
65
+ "sha256_before_namespace_edits": "d719a32f4bcf63e60a0c808d596e30999668d25b529339f7aad523b45d21b6d4",
66
+ "private_destination": "src/millforge/_forge/core/inference.py",
67
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
68
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
69
+ },
70
+ {
71
+ "upstream_path": "src/forge/core/runner.py",
72
+ "sha256_before_namespace_edits": "cbf0f751f0a797646c5e4e325f473ccf348cafcc21f804c40ccf5a22b6a4bafc",
73
+ "private_destination": "src/millforge/_forge/core/runner.py",
74
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
75
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
76
+ },
77
+ {
78
+ "upstream_path": "src/forge/guardrails/error_tracker.py",
79
+ "sha256_before_namespace_edits": "989658eb8fe14c71eaa131ff5ad1767b35cdc1ce0d0315924e7665165f6cfe8a",
80
+ "private_destination": "src/millforge/_forge/guardrails/error_tracker.py",
81
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
82
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
83
+ },
84
+ {
85
+ "upstream_path": "src/forge/guardrails/guardrails.py",
86
+ "sha256_before_namespace_edits": "4ed4beae5988abe9b9c146e898bfb6cecc9c5133a3075747f91f20da23407823",
87
+ "private_destination": "src/millforge/_forge/guardrails/guardrails.py",
88
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
89
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
90
+ },
91
+ {
92
+ "upstream_path": "src/forge/guardrails/nudge.py",
93
+ "sha256_before_namespace_edits": "35a1ff122f9c8b1d12c51051f7453af4abfb0acc605e46b3bfbbf3fc62863c1c",
94
+ "private_destination": "src/millforge/_forge/guardrails/nudge.py",
95
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
96
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
97
+ },
98
+ {
99
+ "upstream_path": "src/forge/guardrails/response_validator.py",
100
+ "sha256_before_namespace_edits": "215d6310e7f1b5194ea39b54d5ea6ac25d137b8169ddc600673e60d8e6de1363",
101
+ "private_destination": "src/millforge/_forge/guardrails/response_validator.py",
102
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
103
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
104
+ },
105
+ {
106
+ "upstream_path": "src/forge/guardrails/step_enforcer.py",
107
+ "sha256_before_namespace_edits": "5a0b50f0f90ba20708fcae6ff13908175d2cb15540e415e13f0dc16b583883c3",
108
+ "private_destination": "src/millforge/_forge/guardrails/step_enforcer.py",
109
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
110
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
111
+ },
112
+ {
113
+ "upstream_path": "src/forge/prompts/nudges.py",
114
+ "sha256_before_namespace_edits": "ccd6a53de5bf3b5577dc19305a15a5041881c04cca364dc7bca4153e64414cef",
115
+ "private_destination": "src/millforge/_forge/prompts/nudges.py",
116
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
117
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
118
+ },
119
+ {
120
+ "upstream_path": "src/forge/prompts/templates.py",
121
+ "sha256_before_namespace_edits": "aff74a8edcf8afc032e9fb1f60e9f47e8a97596363fe50a2861daafb9608e84d",
122
+ "private_destination": "src/millforge/_forge/prompts/templates.py",
123
+ "edit_category": "namespace_rewrite_and_repo_gate_normalization",
124
+ "patch_reason": "Rewrite imports from top-level forge package to private millforge._forge namespace; apply repo formatting/lint cleanup; where needed, replace Python 3.12 PEP 695 type alias syntax with equivalent TypeAlias assignment so local verification tools can parse the vendored subset. No behavioral change."
125
+ }
126
+ ],
127
+ "curated_private_files": [
128
+ {
129
+ "private_destination": "src/millforge/_forge/__init__.py",
130
+ "edit_category": "curated_private_init",
131
+ "patch_reason": "Avoid exporting provider clients, server helpers, hardware discovery, tools, or slot worker from the private vendored subset."
132
+ },
133
+ {
134
+ "private_destination": "src/millforge/_forge/clients/__init__.py",
135
+ "edit_category": "curated_private_init",
136
+ "patch_reason": "Export only transport-free client protocol/helper types from clients/base.py."
137
+ },
138
+ {
139
+ "private_destination": "src/millforge/_forge/context/__init__.py",
140
+ "edit_category": "curated_private_init",
141
+ "patch_reason": "Export only manager and fixed strategy classes; exclude hardware discovery."
142
+ },
143
+ {
144
+ "private_destination": "src/millforge/_forge/core/__init__.py",
145
+ "edit_category": "curated_private_init",
146
+ "patch_reason": "Export only WorkflowRunner from the copied guarded-loop core subset. Use a lazy export so importing core submodules such as messages or workflow does not eagerly import WorkflowRunner and recreate circular imports in the reduced private subset."
147
+ },
148
+ {
149
+ "private_destination": "src/millforge/_forge/guardrails/__init__.py",
150
+ "edit_category": "curated_private_init",
151
+ "patch_reason": "Mirror guardrail subset exports after private namespace rewrite."
152
+ },
153
+ {
154
+ "private_destination": "src/millforge/_forge/prompts/__init__.py",
155
+ "edit_category": "curated_private_init",
156
+ "patch_reason": "Mirror prompt-helper subset exports after private namespace rewrite."
157
+ }
158
+ ],
159
+ "private_behavior_patches": [
160
+ {
161
+ "private_destination": "src/millforge/_forge/adapter.py",
162
+ "edit_category": "private_behavior_patch",
163
+ "patch_reason": "Project the bridge's serial tool-call requirement into provider-neutral model requests as parallel_tool_calls=false. If a provider still returns a batch, preserve it for the private batch-aware runner, which executes each tool call serially."
164
+ },
165
+ {
166
+ "private_destination": "src/millforge/_forge/adapter.py",
167
+ "edit_category": "private_behavior_patch",
168
+ "patch_reason": "Treat soft tool failures as model-correctable even when repeating the same call is unsafe. ToolExecutionResult.retryable controls same-call replay safety; it does not prevent the model from issuing a different corrective call."
169
+ },
170
+ {
171
+ "private_destination": "src/millforge/_forge/core/runner.py",
172
+ "edit_category": "private_behavior_patch",
173
+ "patch_reason": "Expose max_premature_attempts and max_prereq_violations on WorkflowRunner.__init__ and pass them to StepEnforcer so Millforge adapter policy can tune guarded-loop violation budgets without modifying unrelated runner behavior."
174
+ },
175
+ {
176
+ "private_destination": "src/millforge/_forge/errors.py",
177
+ "edit_category": "private_behavior_patch",
178
+ "patch_reason": "Add NonRetryableToolError for tool outcomes that must bypass model self-correction and propagate directly to adapter translation."
179
+ },
180
+ {
181
+ "private_destination": "src/millforge/_forge/core/runner.py",
182
+ "edit_category": "private_behavior_patch",
183
+ "patch_reason": "Catch NonRetryableToolError before the generic Exception branch so it is not converted to a retryable [ToolError] message or counted against generic tool-error correction budgets."
184
+ },
185
+ {
186
+ "private_destination": "src/millforge/_forge/core/workflow.py",
187
+ "edit_category": "private_behavior_patch",
188
+ "patch_reason": "Make ToolSpec.from_json_schema fail closed for the supported V1 subset by rejecting unknown schema keywords, unsupported JSON types, malformed required lists, and arrays without item schemas before a model or tool call can occur."
189
+ },
190
+ {
191
+ "private_destination": "src/millforge/_forge/core/workflow.py",
192
+ "edit_category": "private_behavior_patch",
193
+ "patch_reason": "Document the private mapped prerequisite representation used by Millforge to preserve compiled argument-match semantics when prerequisite and current argument names differ."
194
+ },
195
+ {
196
+ "private_destination": "src/millforge/_forge/core/steps.py",
197
+ "edit_category": "private_behavior_patch",
198
+ "patch_reason": "Extend arg-matched prerequisite checks to support separate prerequisite_arg and current_arg fields while retaining the upstream match_arg shorthand, preserving Millforge compiled prerequisite semantics without widening model-visible tool schemas."
199
+ },
200
+ {
201
+ "private_destination": "src/millforge/_forge/core/__init__.py",
202
+ "edit_category": "private_subset_safety_patch",
203
+ "patch_reason": "Convert the curated core package export to a lazy WorkflowRunner lookup so the reduced private subset remains importable when callers import context or workflow modules directly."
204
+ },
205
+ {
206
+ "private_destination": "src/millforge/_forge/core/workflow.py",
207
+ "edit_category": "private_behavior_patch",
208
+ "patch_reason": "Carry exact provider tool-call IDs and optional non-repr reasoning continuation on the private ToolCall handoff without a signature-keyed identity cache."
209
+ },
210
+ {
211
+ "private_destination": "src/millforge/_forge/core/messages.py",
212
+ "edit_category": "private_behavior_patch",
213
+ "patch_reason": "Retain and serialize typed reasoning continuation on its assistant tool-call message while preserving exact malformed string arguments during retry reconstruction."
214
+ },
215
+ {
216
+ "private_destination": "src/millforge/_forge/core/inference.py",
217
+ "edit_category": "private_behavior_patch",
218
+ "patch_reason": "Preserve provider tool-call IDs and reasoning continuation across inference validation retries instead of regenerating provider call identity."
219
+ },
220
+ {
221
+ "private_destination": "src/millforge/_forge/core/runner.py",
222
+ "edit_category": "private_behavior_patch",
223
+ "patch_reason": "Preserve reasoning continuation on tool, prerequisite, and premature-terminal retry turns and hand exact provider call identity directly to Millforge tool execution."
224
+ },
225
+ {
226
+ "private_destination": "src/millforge/_forge/context/manager.py",
227
+ "edit_category": "private_behavior_patch",
228
+ "patch_reason": "Count retained provider reasoning continuation in the existing fallback context token estimator."
229
+ },
230
+ {
231
+ "private_destination": "src/millforge/_forge/context/strategies.py",
232
+ "edit_category": "private_behavior_patch",
233
+ "patch_reason": "Count reasoning continuation, preserve pairing fields during result truncation, and compact completed replay-bearing tool turns atomically."
234
+ }
235
+ ],
236
+ "excluded_upstream_paths": [
237
+ {
238
+ "path": "src/forge/clients/anthropic.py",
239
+ "reason": "provider client transport"
240
+ },
241
+ {
242
+ "path": "src/forge/clients/llamafile.py",
243
+ "reason": "provider client transport"
244
+ },
245
+ {
246
+ "path": "src/forge/clients/ollama.py",
247
+ "reason": "provider client transport"
248
+ },
249
+ {
250
+ "path": "src/forge/clients/openai_compat.py",
251
+ "reason": "provider client transport"
252
+ },
253
+ {
254
+ "path": "src/forge/clients/sampling_defaults.py",
255
+ "reason": "not required by fixed Millforge sampling policy"
256
+ },
257
+ {
258
+ "path": "src/forge/clients/vllm.py",
259
+ "reason": "provider client transport"
260
+ },
261
+ {
262
+ "path": "src/forge/context/hardware.py",
263
+ "reason": "hardware discovery is not required by fixed context policy"
264
+ },
265
+ {
266
+ "path": "src/forge/core/slot_worker.py",
267
+ "reason": "server-style slot worker outside guarded-loop subset"
268
+ },
269
+ {
270
+ "path": "src/forge/proxy/",
271
+ "reason": "proxy and transport implementation code"
272
+ },
273
+ {
274
+ "path": "src/forge/server.py",
275
+ "reason": "server module"
276
+ },
277
+ {
278
+ "path": "src/forge/tools/",
279
+ "reason": "built-in tool implementation outside adapter bridge"
280
+ },
281
+ {
282
+ "path": "tests/eval/",
283
+ "reason": "eval datasets and dashboards"
284
+ },
285
+ {
286
+ "path": "docs/results/",
287
+ "reason": "dashboard artifacts"
288
+ },
289
+ {
290
+ "path": "scripts/",
291
+ "reason": "CLI/script entry points"
292
+ }
293
+ ],
294
+ "runtime_dependency_note": "Runtime imports use only src/millforge/_forge; ref-forge/ is optional test provenance input and is not imported by package code."
295
+ }
@@ -0,0 +1,24 @@
1
+ # Vendored Forge Update Policy
2
+
3
+ The private Forge subset may only be updated as an isolated, reviewable
4
+ change. The update record must identify the old and new upstream repository,
5
+ commit, package version, license, import date, and reviewed local patch set.
6
+
7
+ Required update steps:
8
+
9
+ 1. Review upstream `CHANGELOG.md`, architecture docs, and decision records for
10
+ changed guarded-loop behavior, dependency boundaries, and license notices.
11
+ 2. Diff every path listed in `PROVENANCE.json` against the new upstream
12
+ snapshot before copying files.
13
+ 3. Recheck exclusions for provider clients, proxy/server/CLI modules, eval
14
+ assets, dashboards, hardware discovery, `httpx`, provider SDKs, and
15
+ transport implementation code.
16
+ 4. Copy the accepted subset from the fixed upstream snapshot, recompute
17
+ source SHA-256 values before namespace edits, and update destination paths,
18
+ edit categories, patch reasons, and license files together.
19
+ 5. Reapply private namespace, subset, and behavior patches deliberately,
20
+ documenting the edit category and rationale for each patch in the manifest.
21
+ 6. Run upstream-derived provenance tests and Millforge adapter tests,
22
+ including the package build and wheel-content checks.
23
+ 7. Commit the copy, manifest, license, policy, and tests as one isolated
24
+ provenance update.
@@ -0,0 +1,14 @@
1
+ """Private vendored Forge guarded-loop subset.
2
+
3
+ This package is not part of Millforge's public API. It contains the reviewed
4
+ transport-free Forge v0.7.4 subset used by later private adapter stages.
5
+ """
6
+
7
+ from importlib.metadata import PackageNotFoundError, version as _pkg_version
8
+
9
+ try:
10
+ __version__ = _pkg_version("forge-guardrails")
11
+ except PackageNotFoundError:
12
+ __version__ = "0.7.4+vendored"
13
+
14
+ __all__ = ["__version__"]