pdx-artifact-engine 0.3.0a1__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.
Files changed (79) hide show
  1. pdx_artifact_engine-0.3.0a1/LICENSE +190 -0
  2. pdx_artifact_engine-0.3.0a1/PKG-INFO +212 -0
  3. pdx_artifact_engine-0.3.0a1/README.md +198 -0
  4. pdx_artifact_engine-0.3.0a1/adapters/prodocux/pdx_adapter_prodocux/__init__.py +42 -0
  5. pdx_artifact_engine-0.3.0a1/adapters/prodocux/pdx_adapter_prodocux/document_profile.py +97 -0
  6. pdx_artifact_engine-0.3.0a1/adapters/prodocux/pdx_adapter_prodocux/http_client.py +198 -0
  7. pdx_artifact_engine-0.3.0a1/adapters/prodocux/pdx_adapter_prodocux/inputs.py +59 -0
  8. pdx_artifact_engine-0.3.0a1/adapters/prodocux/pdx_adapter_prodocux/pdf_extract_pages.py +318 -0
  9. pdx_artifact_engine-0.3.0a1/adapters/prodocux/pdx_adapter_prodocux/presentation_profile.py +98 -0
  10. pdx_artifact_engine-0.3.0a1/adapters/prodocux/pdx_adapter_prodocux/table_profile.py +97 -0
  11. pdx_artifact_engine-0.3.0a1/adapters/prodocux/pdx_adapter_prodocux/validate_structure.py +168 -0
  12. pdx_artifact_engine-0.3.0a1/adapters/prodocux/pdx_adapter_prodocux/workbook_profile.py +96 -0
  13. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/__init__.py +142 -0
  14. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/approval.py +158 -0
  15. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/compat_v0.py +98 -0
  16. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/events.py +123 -0
  17. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/execution.py +117 -0
  18. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/external_operations.py +154 -0
  19. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/protocols.py +90 -0
  20. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/receipts.py +91 -0
  21. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/__init__.py +1 -0
  22. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/approval_decision.v1.schema.json +12 -0
  23. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/approval_request.v1.schema.json +11 -0
  24. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/artifact_storage_identity.v1.schema.json +45 -0
  25. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/execution_context.v1.schema.json +35 -0
  26. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/execution_plan.v1.schema.json +191 -0
  27. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/external_operation.v1.schema.json +110 -0
  28. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/publication_receipt.v1.schema.json +88 -0
  29. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/run_event.v1.schema.json +45 -0
  30. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/run_snapshot.v1.schema.json +59 -0
  31. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/step_receipt.v1.schema.json +98 -0
  32. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/tool_request.v1.schema.json +48 -0
  33. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/tool_result.v1.schema.json +83 -0
  34. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/verifier_result.v1.schema.json +20 -0
  35. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/schemas/workflow_checkpoint.v1.schema.json +13 -0
  36. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/snapshots.py +272 -0
  37. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/state.py +68 -0
  38. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/storage.py +23 -0
  39. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/validate.py +193 -0
  40. pdx_artifact_engine-0.3.0a1/packages/pdx_artifact_core/src/pdx_artifact_core/verification.py +69 -0
  41. pdx_artifact_engine-0.3.0a1/pdx_artifact_engine.egg-info/PKG-INFO +212 -0
  42. pdx_artifact_engine-0.3.0a1/pdx_artifact_engine.egg-info/SOURCES.txt +77 -0
  43. pdx_artifact_engine-0.3.0a1/pdx_artifact_engine.egg-info/dependency_links.txt +1 -0
  44. pdx_artifact_engine-0.3.0a1/pdx_artifact_engine.egg-info/entry_points.txt +3 -0
  45. pdx_artifact_engine-0.3.0a1/pdx_artifact_engine.egg-info/requires.txt +5 -0
  46. pdx_artifact_engine-0.3.0a1/pdx_artifact_engine.egg-info/top_level.txt +3 -0
  47. pdx_artifact_engine-0.3.0a1/pyproject.toml +35 -0
  48. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/__init__.py +41 -0
  49. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/cli/__init__.py +2 -0
  50. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/cli/run.py +87 -0
  51. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/cli/validate.py +41 -0
  52. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/dispatcher.py +782 -0
  53. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/errors.py +14 -0
  54. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/executors.py +83 -0
  55. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/manifest.py +50 -0
  56. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/paths.py +21 -0
  57. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/plan.py +17 -0
  58. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/planners.py +142 -0
  59. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/registry.py +110 -0
  60. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/run_manifest.py +41 -0
  61. pdx_artifact_engine-0.3.0a1/runtime/pdx_artifact_engine/runtime.py +216 -0
  62. pdx_artifact_engine-0.3.0a1/setup.cfg +4 -0
  63. pdx_artifact_engine-0.3.0a1/tests/test_adapter_media.py +151 -0
  64. pdx_artifact_engine-0.3.0a1/tests/test_adapter_prodocux.py +389 -0
  65. pdx_artifact_engine-0.3.0a1/tests/test_approval_resume.py +175 -0
  66. pdx_artifact_engine-0.3.0a1/tests/test_artifact_runtime.py +44 -0
  67. pdx_artifact_engine-0.3.0a1/tests/test_compatibility_manifest.py +39 -0
  68. pdx_artifact_engine-0.3.0a1/tests/test_compatibility_v2_candidate.py +89 -0
  69. pdx_artifact_engine-0.3.0a1/tests/test_core_contracts.py +271 -0
  70. pdx_artifact_engine-0.3.0a1/tests/test_dispatcher_v1.py +174 -0
  71. pdx_artifact_engine-0.3.0a1/tests/test_execution_receipts_events_v1.py +121 -0
  72. pdx_artifact_engine-0.3.0a1/tests/test_external_operations.py +110 -0
  73. pdx_artifact_engine-0.3.0a1/tests/test_release_hygiene.py +74 -0
  74. pdx_artifact_engine-0.3.0a1/tests/test_runtime.py +312 -0
  75. pdx_artifact_engine-0.3.0a1/tests/test_schema_examples.py +62 -0
  76. pdx_artifact_engine-0.3.0a1/tests/test_snapshot_contracts.py +112 -0
  77. pdx_artifact_engine-0.3.0a1/tests/test_snapshot_resume.py +265 -0
  78. pdx_artifact_engine-0.3.0a1/tests/test_storage_events.py +117 -0
  79. pdx_artifact_engine-0.3.0a1/tests/test_verifier_registry.py +103 -0
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 ProDocuX contributors
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,212 @@
1
+ Metadata-Version: 2.4
2
+ Name: pdx-artifact-engine
3
+ Version: 0.3.0a1
4
+ Summary: Model-optional deterministic artifact orchestration framework for PDX skills
5
+ License-Expression: Apache-2.0
6
+ Requires-Python: >=3.11
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: jsonschema>=4.22.0
10
+ Provides-Extra: dev
11
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
12
+ Requires-Dist: ruff>=0.5.0; extra == "dev"
13
+ Dynamic: license-file
14
+
15
+ # PDX Artifact Engine
16
+
17
+ PDX Artifact Engine is a **model-optional**, deterministic artifact orchestration
18
+ framework. It turns structured plans into skill calls, verification results, and
19
+ checksummed manifests.
20
+
21
+ > **No trained PDX model weights are included in this repository.**
22
+ > Plans may be supplied manually, by rules, or later by an external model
23
+ > provider. PDX-5B-1B+ experts are an optional future bundle, not a v0.1.0
24
+ > requirement.
25
+
26
+ **v0.3.0a1 prerelease:** the repository ships `pdx_artifact_core` execution
27
+ contracts plus bounded snapshots, replay-safe resume primitives, repository
28
+ ports, external-operation reconciliation, execution context/cancellation,
29
+ publication receipts, and ordered run events. Legacy Dispatcher compatibility
30
+ and the frozen compatibility v1 surface remain available.
31
+
32
+ ## Positioning
33
+
34
+ | Claim | Status |
35
+ |---|---|
36
+ | `pdx_execution_plan_v1` + ToolRequest/Result schemas | **Available (core 0.3.0a1)** |
37
+ | v0→v1 plan translator (rejects unresolved `expert`) | **Available (core)** |
38
+ | Run state machine (`awaiting_*` → `running`) | **Available (core)** |
39
+ | Bounded run snapshot + step receipt contracts | **Available (core 0.3.0a1)** |
40
+ | Checkpoint CAS + decision record-once repository ports | **Available (core)** |
41
+ | Replay-safe pending-only snapshot resume | **Available (engine)** |
42
+ | External-operation pending/unknown/reconcile lifecycle | **Available (core)** |
43
+ | Execution context, cooperative cancellation, receipts, ordered events | **Available (core)** |
44
+ | Validate `plan.json` against v0 schema | Available |
45
+ | Load skill registry + dispatch skills | Available (v0 kinds) |
46
+ | Deterministic fixture staging | Available |
47
+ | Mock skill execution for CI / demos | Available |
48
+ | Write `artifact_manifest.json` + `run_manifest.json` | Available |
49
+ | `RulePlanner` / `ManualPlanner` | Available (to move out of Core per plan) |
50
+ | ProDocuX HTTP `/v1` adapter | **Available (alpha)** (`adapters/prodocux/`) |
51
+ | Real ProDocuX / FreeCAD / Blender subprocess execution | Register executors |
52
+ | `LlamaCppPlanner` / GGUF download / hot-swap | Planned |
53
+ | Shipped `PDX-Core-1B` weights | **Not included** (separate release) |
54
+
55
+ Target architecture (not present in v0.1.0): a future 8 GB mode may keep a
56
+ `PDX-Core-1B` router resident and hot-swap specialists. That is a roadmap goal,
57
+ not a current runtime capability.
58
+
59
+ ## Core thesis
60
+
61
+ ```text
62
+ plan.json (manual | rules | future model provider)
63
+ -> skill dispatch
64
+ -> artifact outputs
65
+ -> verification
66
+ -> artifact_manifest.json + run_manifest.json
67
+ ```
68
+
69
+ Small models should eventually plan and repair. Skills should execute artifact
70
+ creation with deterministic tools. v0.1.0 proves the second half without the
71
+ first.
72
+
73
+ ## Install
74
+
75
+ ```bash
76
+ pip install -e ".[dev]"
77
+ ```
78
+
79
+ Install the published GitHub prerelease wheel with:
80
+
81
+ ```bash
82
+ pip install "https://github.com/prodocux/pdx-artifact-engine/releases/download/v0.3.0a1/pdx_artifact_engine-0.3.0a1-py3-none-any.whl"
83
+ ```
84
+
85
+ Requires Python 3.11+.
86
+
87
+ The product-neutral ProDocuX HTTP adapter ships in the main distribution. The
88
+ media identity/probe adapter is optional and has its own package:
89
+
90
+ ```bash
91
+ pip install ./adapters/media
92
+ ```
93
+
94
+ See [`docs/RELEASE.md`](docs/RELEASE.md) for package boundaries and release
95
+ verification.
96
+
97
+ The active coordinated ProDocuX/PDX prerelease surface is recorded in
98
+ [`compatibility/pdx_prodocux_compatibility_v2.json`](compatibility/pdx_prodocux_compatibility_v2.json).
99
+ The immutable v1 manifest remains packaged in the repository as historical
100
+ compatibility evidence.
101
+
102
+ ## Deterministic demo (no LLM)
103
+
104
+ From the repository root:
105
+
106
+ ```bash
107
+ python -m pdx_artifact_engine.cli.run \
108
+ --plan examples/plans/pif_deterministic_plan.json \
109
+ --output-dir .tmp/pif-deterministic \
110
+ --mock
111
+ ```
112
+
113
+ Or generate a plan with `RulePlanner`:
114
+
115
+ ```bash
116
+ python -m pdx_artifact_engine.cli.run \
117
+ --rule-request examples/requests/pif_rule_request.json \
118
+ --output-dir .tmp/pif-rule \
119
+ --mock
120
+ ```
121
+
122
+ Both write:
123
+
124
+ - `run_manifest.json` — overall `completed` / `completed_with_review` / `failed` / `blocked`
125
+ - `artifact_manifest.json` — files, provenance, verification
126
+
127
+ CLI exit code is `1` when status is `failed` or `blocked`.
128
+
129
+ ### Aspirational plan (contains expert step)
130
+
131
+ `examples/plans/pif_workflow_plan.json` still includes a `PDX-Doc-1B` expert step
132
+ to document the future shape. Without `--mock`, that plan **blocks**. With
133
+ `--mock`, the expert is simulated and the run is marked `completed_with_review`.
134
+
135
+ ## Planner providers
136
+
137
+ | Provider | v0.1.0 |
138
+ |---|---|
139
+ | `ManualPlanner` (`--plan`) | Yes |
140
+ | `RulePlanner` (`--rule-request`) | Yes |
141
+ | `ExternalPlanner` | Stub (raises) |
142
+ | `LlamaCppPlanner` | Stub (raises; reserved for v0.2.0+) |
143
+ | Future `PDXCorePlanner` | Not started |
144
+
145
+ ## Schemas
146
+
147
+ | Schema | Purpose |
148
+ |---|---|
149
+ | `schemas/plan.schema.json` | Workflow plan (+ optional `depends_on`) |
150
+ | `schemas/skill.schema.json` | One skill's metadata |
151
+ | `schemas/skill_registry.schema.json` | Registry document |
152
+ | `schemas/artifact_manifest.schema.json` | Deliverable manifest |
153
+ | `schemas/run_manifest.schema.json` | Run status |
154
+ | `schemas/model_manifest.schema.json` | Optional model descriptor (no weights) |
155
+ | `schemas/3d_spec.schema.json` | CAD/scene specs |
156
+
157
+ The packaged Core additionally publishes execution-plan, verifier-result,
158
+ workflow-checkpoint, approval, artifact identity, step receipt, run snapshot,
159
+ external operation, execution context, publication receipt, and run event v1
160
+ contracts. `ArtifactRuntime` accepts product-owned verifier implementations
161
+ through an injected registry; missing verifiers fail closed unless the host
162
+ explicitly selects review policy. Serialized snapshot resume validates plan,
163
+ subject, evidence, artifact, and receipt digests and executes only pending
164
+ steps. Provider polling, durable databases, scheduling, and domain policy stay
165
+ outside Core.
166
+
167
+ Model weights stay outside git. Describe them with
168
+ `examples/models/*.manifest.json` and `docs/model-cards/`.
169
+
170
+ ## Repository layout
171
+
172
+ ```text
173
+ docs/ Architecture, roadmap, model cards
174
+ schemas/ JSON contracts
175
+ examples/ Plans, fixtures, rule requests, model manifests
176
+ notebooks/kaggle/ Training plans (no weights)
177
+ runtime/ Python package `pdx_artifact_engine`
178
+ skills/ Sample skill registry
179
+ evals/ Eval notes
180
+ tests/ pytest
181
+ ```
182
+
183
+ ## v0.1.0 release criteria
184
+
185
+ - [x] Apache-2.0 license
186
+ - [x] Unified skill + registry contract
187
+ - [x] README states model-optional clearly
188
+ - [x] `depends_on` + `$step.output` wiring
189
+ - [x] Honest run status (no silent success on blocked experts)
190
+ - [x] Deterministic E2E example without LLM
191
+ - [x] `model_manifest` schema (weights out of band)
192
+ - [x] Path traversal rejection for `file_exists` / mock outputs
193
+ - [x] Unknown skill / executor errors always write schema-valid failed manifests
194
+ - [x] Cycle detection covered by tests
195
+ - [x] Fresh Python 3.12 venv pytest green
196
+
197
+ ## License
198
+
199
+ Apache License 2.0. See [LICENSE](LICENSE).
200
+
201
+ ## Near-term roadmap
202
+
203
+ 1. Register real ProDocuX skill executors (M1).
204
+ 2. Convert ProDocuX runs into planner traces.
205
+ 3. Train and publish `PDX-Core-1B` out of band; wire `LlamaCppPlanner` (v0.2.0).
206
+ 4. Low-RAM hot-swap runtime (M7).
207
+
208
+ ## Acknowledgments
209
+
210
+ Codex and Cursor contributed implementation support, contract hardening, and
211
+ cross-review during the v0.3 prerelease upgrade. Final design and release decisions remain
212
+ with the project maintainers.
@@ -0,0 +1,198 @@
1
+ # PDX Artifact Engine
2
+
3
+ PDX Artifact Engine is a **model-optional**, deterministic artifact orchestration
4
+ framework. It turns structured plans into skill calls, verification results, and
5
+ checksummed manifests.
6
+
7
+ > **No trained PDX model weights are included in this repository.**
8
+ > Plans may be supplied manually, by rules, or later by an external model
9
+ > provider. PDX-5B-1B+ experts are an optional future bundle, not a v0.1.0
10
+ > requirement.
11
+
12
+ **v0.3.0a1 prerelease:** the repository ships `pdx_artifact_core` execution
13
+ contracts plus bounded snapshots, replay-safe resume primitives, repository
14
+ ports, external-operation reconciliation, execution context/cancellation,
15
+ publication receipts, and ordered run events. Legacy Dispatcher compatibility
16
+ and the frozen compatibility v1 surface remain available.
17
+
18
+ ## Positioning
19
+
20
+ | Claim | Status |
21
+ |---|---|
22
+ | `pdx_execution_plan_v1` + ToolRequest/Result schemas | **Available (core 0.3.0a1)** |
23
+ | v0→v1 plan translator (rejects unresolved `expert`) | **Available (core)** |
24
+ | Run state machine (`awaiting_*` → `running`) | **Available (core)** |
25
+ | Bounded run snapshot + step receipt contracts | **Available (core 0.3.0a1)** |
26
+ | Checkpoint CAS + decision record-once repository ports | **Available (core)** |
27
+ | Replay-safe pending-only snapshot resume | **Available (engine)** |
28
+ | External-operation pending/unknown/reconcile lifecycle | **Available (core)** |
29
+ | Execution context, cooperative cancellation, receipts, ordered events | **Available (core)** |
30
+ | Validate `plan.json` against v0 schema | Available |
31
+ | Load skill registry + dispatch skills | Available (v0 kinds) |
32
+ | Deterministic fixture staging | Available |
33
+ | Mock skill execution for CI / demos | Available |
34
+ | Write `artifact_manifest.json` + `run_manifest.json` | Available |
35
+ | `RulePlanner` / `ManualPlanner` | Available (to move out of Core per plan) |
36
+ | ProDocuX HTTP `/v1` adapter | **Available (alpha)** (`adapters/prodocux/`) |
37
+ | Real ProDocuX / FreeCAD / Blender subprocess execution | Register executors |
38
+ | `LlamaCppPlanner` / GGUF download / hot-swap | Planned |
39
+ | Shipped `PDX-Core-1B` weights | **Not included** (separate release) |
40
+
41
+ Target architecture (not present in v0.1.0): a future 8 GB mode may keep a
42
+ `PDX-Core-1B` router resident and hot-swap specialists. That is a roadmap goal,
43
+ not a current runtime capability.
44
+
45
+ ## Core thesis
46
+
47
+ ```text
48
+ plan.json (manual | rules | future model provider)
49
+ -> skill dispatch
50
+ -> artifact outputs
51
+ -> verification
52
+ -> artifact_manifest.json + run_manifest.json
53
+ ```
54
+
55
+ Small models should eventually plan and repair. Skills should execute artifact
56
+ creation with deterministic tools. v0.1.0 proves the second half without the
57
+ first.
58
+
59
+ ## Install
60
+
61
+ ```bash
62
+ pip install -e ".[dev]"
63
+ ```
64
+
65
+ Install the published GitHub prerelease wheel with:
66
+
67
+ ```bash
68
+ pip install "https://github.com/prodocux/pdx-artifact-engine/releases/download/v0.3.0a1/pdx_artifact_engine-0.3.0a1-py3-none-any.whl"
69
+ ```
70
+
71
+ Requires Python 3.11+.
72
+
73
+ The product-neutral ProDocuX HTTP adapter ships in the main distribution. The
74
+ media identity/probe adapter is optional and has its own package:
75
+
76
+ ```bash
77
+ pip install ./adapters/media
78
+ ```
79
+
80
+ See [`docs/RELEASE.md`](docs/RELEASE.md) for package boundaries and release
81
+ verification.
82
+
83
+ The active coordinated ProDocuX/PDX prerelease surface is recorded in
84
+ [`compatibility/pdx_prodocux_compatibility_v2.json`](compatibility/pdx_prodocux_compatibility_v2.json).
85
+ The immutable v1 manifest remains packaged in the repository as historical
86
+ compatibility evidence.
87
+
88
+ ## Deterministic demo (no LLM)
89
+
90
+ From the repository root:
91
+
92
+ ```bash
93
+ python -m pdx_artifact_engine.cli.run \
94
+ --plan examples/plans/pif_deterministic_plan.json \
95
+ --output-dir .tmp/pif-deterministic \
96
+ --mock
97
+ ```
98
+
99
+ Or generate a plan with `RulePlanner`:
100
+
101
+ ```bash
102
+ python -m pdx_artifact_engine.cli.run \
103
+ --rule-request examples/requests/pif_rule_request.json \
104
+ --output-dir .tmp/pif-rule \
105
+ --mock
106
+ ```
107
+
108
+ Both write:
109
+
110
+ - `run_manifest.json` — overall `completed` / `completed_with_review` / `failed` / `blocked`
111
+ - `artifact_manifest.json` — files, provenance, verification
112
+
113
+ CLI exit code is `1` when status is `failed` or `blocked`.
114
+
115
+ ### Aspirational plan (contains expert step)
116
+
117
+ `examples/plans/pif_workflow_plan.json` still includes a `PDX-Doc-1B` expert step
118
+ to document the future shape. Without `--mock`, that plan **blocks**. With
119
+ `--mock`, the expert is simulated and the run is marked `completed_with_review`.
120
+
121
+ ## Planner providers
122
+
123
+ | Provider | v0.1.0 |
124
+ |---|---|
125
+ | `ManualPlanner` (`--plan`) | Yes |
126
+ | `RulePlanner` (`--rule-request`) | Yes |
127
+ | `ExternalPlanner` | Stub (raises) |
128
+ | `LlamaCppPlanner` | Stub (raises; reserved for v0.2.0+) |
129
+ | Future `PDXCorePlanner` | Not started |
130
+
131
+ ## Schemas
132
+
133
+ | Schema | Purpose |
134
+ |---|---|
135
+ | `schemas/plan.schema.json` | Workflow plan (+ optional `depends_on`) |
136
+ | `schemas/skill.schema.json` | One skill's metadata |
137
+ | `schemas/skill_registry.schema.json` | Registry document |
138
+ | `schemas/artifact_manifest.schema.json` | Deliverable manifest |
139
+ | `schemas/run_manifest.schema.json` | Run status |
140
+ | `schemas/model_manifest.schema.json` | Optional model descriptor (no weights) |
141
+ | `schemas/3d_spec.schema.json` | CAD/scene specs |
142
+
143
+ The packaged Core additionally publishes execution-plan, verifier-result,
144
+ workflow-checkpoint, approval, artifact identity, step receipt, run snapshot,
145
+ external operation, execution context, publication receipt, and run event v1
146
+ contracts. `ArtifactRuntime` accepts product-owned verifier implementations
147
+ through an injected registry; missing verifiers fail closed unless the host
148
+ explicitly selects review policy. Serialized snapshot resume validates plan,
149
+ subject, evidence, artifact, and receipt digests and executes only pending
150
+ steps. Provider polling, durable databases, scheduling, and domain policy stay
151
+ outside Core.
152
+
153
+ Model weights stay outside git. Describe them with
154
+ `examples/models/*.manifest.json` and `docs/model-cards/`.
155
+
156
+ ## Repository layout
157
+
158
+ ```text
159
+ docs/ Architecture, roadmap, model cards
160
+ schemas/ JSON contracts
161
+ examples/ Plans, fixtures, rule requests, model manifests
162
+ notebooks/kaggle/ Training plans (no weights)
163
+ runtime/ Python package `pdx_artifact_engine`
164
+ skills/ Sample skill registry
165
+ evals/ Eval notes
166
+ tests/ pytest
167
+ ```
168
+
169
+ ## v0.1.0 release criteria
170
+
171
+ - [x] Apache-2.0 license
172
+ - [x] Unified skill + registry contract
173
+ - [x] README states model-optional clearly
174
+ - [x] `depends_on` + `$step.output` wiring
175
+ - [x] Honest run status (no silent success on blocked experts)
176
+ - [x] Deterministic E2E example without LLM
177
+ - [x] `model_manifest` schema (weights out of band)
178
+ - [x] Path traversal rejection for `file_exists` / mock outputs
179
+ - [x] Unknown skill / executor errors always write schema-valid failed manifests
180
+ - [x] Cycle detection covered by tests
181
+ - [x] Fresh Python 3.12 venv pytest green
182
+
183
+ ## License
184
+
185
+ Apache License 2.0. See [LICENSE](LICENSE).
186
+
187
+ ## Near-term roadmap
188
+
189
+ 1. Register real ProDocuX skill executors (M1).
190
+ 2. Convert ProDocuX runs into planner traces.
191
+ 3. Train and publish `PDX-Core-1B` out of band; wire `LlamaCppPlanner` (v0.2.0).
192
+ 4. Low-RAM hot-swap runtime (M7).
193
+
194
+ ## Acknowledgments
195
+
196
+ Codex and Cursor contributed implementation support, contract hardening, and
197
+ cross-review during the v0.3 prerelease upgrade. Final design and release decisions remain
198
+ with the project maintainers.
@@ -0,0 +1,42 @@
1
+ """Product-neutral ProDocuX HTTP adapter.
2
+
3
+ - Kernel ``/v1`` tools (e.g. validate-structure)
4
+ - Skill façades (e.g. pdf_extract_pages) — **not** automatically Kernel routes
5
+
6
+ Never imports ``prodocux_kernel`` or ``skills.*``.
7
+ """
8
+
9
+ from .http_client import ProDocuXHttpClient, ProDocuXHttpError
10
+ from .pdf_extract_pages import (
11
+ LEGACY_TOOL_ID as PDF_EXTRACT_LEGACY_ID,
12
+ TOOL_ID as PDF_EXTRACT_PAGES_TOOL_ID,
13
+ PdfExtractPagesExecutor,
14
+ make_pdf_extract_pages_executor,
15
+ )
16
+ from .validate_structure import ValidateStructureExecutor, make_validate_structure_executor
17
+ from .table_profile import TableProfileExecutor, make_table_profile_executor
18
+ from .workbook_profile import WorkbookProfileExecutor, make_workbook_profile_executor
19
+ from .document_profile import DocumentProfileExecutor, make_document_profile_executor
20
+ from .presentation_profile import (
21
+ PresentationProfileExecutor,
22
+ make_presentation_profile_executor,
23
+ )
24
+
25
+ __all__ = [
26
+ "ProDocuXHttpClient",
27
+ "ProDocuXHttpError",
28
+ "ValidateStructureExecutor",
29
+ "make_validate_structure_executor",
30
+ "PdfExtractPagesExecutor",
31
+ "make_pdf_extract_pages_executor",
32
+ "PDF_EXTRACT_PAGES_TOOL_ID",
33
+ "PDF_EXTRACT_LEGACY_ID",
34
+ "TableProfileExecutor",
35
+ "make_table_profile_executor",
36
+ "WorkbookProfileExecutor",
37
+ "make_workbook_profile_executor",
38
+ "DocumentProfileExecutor",
39
+ "make_document_profile_executor",
40
+ "PresentationProfileExecutor",
41
+ "make_presentation_profile_executor",
42
+ ]