@dickpy/dsh-oil-slide 0.0.0-stage → 0.2.7
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.
- package/LICENSE +21 -0
- package/README.md +89 -2
- package/bundled-assets/brand/empty-deck-cobalt.webp +0 -0
- package/bundled-assets/brand/oil-slide-mark-512.png +0 -0
- package/bundled-assets/skill/LICENSE +21 -0
- package/bundled-assets/skill/README.md +61 -0
- package/bundled-assets/skill/SKILL.md +185 -0
- package/bundled-assets/skill/references/art-directions.md +99 -0
- package/bundled-assets/skill/references/brand-and-canvas.md +72 -0
- package/bundled-assets/skill/references/design-baseline.txt +1 -0
- package/bundled-assets/skill/references/prompt-compiler.md +99 -0
- package/bundled-assets/skill/references/restore-and-pptx.md +178 -0
- package/bundled-assets/skill/references/staged-pptx.md +71 -0
- package/bundled-assets/skill/scripts/_runtime_utils.py +351 -0
- package/bundled-assets/skill/scripts/asset_sheet.py +528 -0
- package/bundled-assets/skill/scripts/brand_ref.py +776 -0
- package/bundled-assets/skill/scripts/crop_asset.py +1709 -0
- package/bundled-assets/skill/scripts/deck_shell.py +2322 -0
- package/bundled-assets/skill/scripts/export_images.py +280 -0
- package/bundled-assets/skill/scripts/extract_pptx.py +360 -0
- package/bundled-assets/skill/scripts/extract_slide_dom.js +1640 -0
- package/bundled-assets/skill/scripts/html_to_pptx.py +4042 -0
- package/bundled-assets/skill/scripts/measure_slide_layout.py +952 -0
- package/bundled-assets/skill/scripts/oiloil-connect.mjs +1493 -0
- package/bundled-assets/skill/scripts/oiloil-image.mjs +492 -0
- package/bundled-assets/skill/scripts/prepare_plate.py +412 -0
- package/bundled-assets/skill/scripts/render_gradient.py +258 -0
- package/bundled-assets/skill/scripts/slide_brand.py +111 -0
- package/bundled-assets/skill/scripts/slide_incremental.py +122 -0
- package/bundled-assets/skill/scripts/slide_workflow.py +711 -0
- package/bundled-assets/skill/scripts/verify_deck.py +3483 -0
- package/bundled-assets/skill/vendor/README.md +4 -0
- package/bundled-assets/skill/vendor/codex-ppt/LICENSE +21 -0
- package/bundled-assets/skill/vendor/codex-ppt/assemble_ppt.py +435 -0
- package/bundled-assets/skill/vendor/codex-ppt/codex_ppt_runtime.py +284 -0
- package/bundled-assets/skill/vendor/codex-ppt/image_gen.py +972 -0
- package/bundled-assets/skill/vendor/codex-ppt/image_providers/__init__.py +6 -0
- package/bundled-assets/skill/vendor/codex-ppt/image_providers/atlascloud.py +222 -0
- package/bundled-assets/skill/vendor/codex-ppt/image_providers/base.py +32 -0
- package/bundled-assets/skill/vendor/codex-ppt/image_providers/factory.py +21 -0
- package/bundled-assets/skill/vendor/codex-ppt/image_providers/openai_compatible.py +238 -0
- package/bundled-assets/skill/vendor/codex-ppt/requirements.txt +5 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//345/205/232/346/224/277/347/272/242/351/243/216/346/240/274.md +98 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//345/210/233/346/204/217/346/235/202/345/277/227/351/243/216.md +72 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//345/244/215/345/217/244/346/211/201/345/271/263/346/217/222/347/224/273/351/243/216.md +72 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//346/211/213/347/273/230/346/212/200/346/234/257/350/247/243/351/207/212/351/243/216.md +86 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//346/211/213/347/273/230/347/231/275/346/235/277/351/243/216.md +72 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//346/225/231/345/255/246/350/257/276/344/273/266/351/243/216.md +107 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//346/225/260/346/215/256/344/273/252/350/241/250/347/233/230/351/243/216.md +73 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//346/270/205/347/210/275/344/270/223/344/270/232/351/243/216.md +87 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//346/270/251/346/232/226/346/211/213/345/267/245/351/243/216.md +72 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//347/224/265/345/255/220/345/242/250/346/260/264/346/235/202/345/277/227/351/243/216.md +86 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//347/247/221/347/240/224/347/255/224/350/276/251/351/243/216.md +138 -0
- package/bundled-assets/skill/vendor/codex-ppt/styles//351/272/246/350/202/257/351/224/241/351/243/216/346/240/274.md +119 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/LICENSE +21 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/SKILL.md +171 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/agents/openai.yaml +4 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/__init__.py +1 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/cli.py +25 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/__init__.py +1 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/_input_normalization.py +355 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/_page_artifacts.py +132 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/build_pptx_from_manifest.py +1029 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/configure_image_backend.py +52 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/deck_run_state.py +214 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/deck_text_hints.py +179 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/finalize_deck_run.py +96 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/formula_renderer.py +254 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/image_gen.py +206 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/main.py +795 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/make_page_contact_sheet.py +28 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/native_tables.py +140 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/paddle_text_hints.py +212 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/page_job_status.py +54 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/page_text_metrics.py +334 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/path_geometry.py +174 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/prepare_deck_run.py +209 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/process_asset_sheet.py +104 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/record_imagegen_result.py +118 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/record_page_dispatch.py +83 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/record_page_result.py +130 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/remove_chroma_key.py +441 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/reset_page_job.py +74 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/runtime_env.py +283 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/split_alpha_components.py +323 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/text_hints.py +309 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/editppt/runtime/validate_pptx.py +873 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/cli/pyproject.toml +29 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/prompts/page-worker.md +47 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/references/cli-helper.md +282 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/references/manifest-schema.md +423 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/references/page-decision-tree.md +301 -0
- package/bundled-assets/skill/vendor/image-to-editable-ppt/scripts/build-page-worker-prompt.py +134 -0
- package/cordis.patch.yml +3 -0
- package/lib/client.js +11282 -0
- package/lib/index.js +2638 -0
- package/package.json +140 -4
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
# Manifest Schema
|
|
2
|
+
|
|
3
|
+
This document describes the responsibilities, owners, and current field contracts for `editppt` run/page JSON files. All key state is advanced by `editppt` commands; page reconstructors write only page-local files.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- `deck_manifest.json`
|
|
8
|
+
- `page_jobs.json`
|
|
9
|
+
- `page_request.json`
|
|
10
|
+
- `page_result.json`
|
|
11
|
+
- `pages/page_NNN/validation.json`
|
|
12
|
+
- `pages/page_NNN/manifest.json` (including Native tables)
|
|
13
|
+
- `pages/page_NNN/imagegen-jobs.json`
|
|
14
|
+
- Asset sheet regions and split reports
|
|
15
|
+
- `notes_manifest.json`
|
|
16
|
+
|
|
17
|
+
## `deck_manifest.json`
|
|
18
|
+
|
|
19
|
+
Owner: created by `editppt prepare`; `editppt run backend` may update the image backend; `editppt run finalize` reads it and writes completion time.
|
|
20
|
+
|
|
21
|
+
Purpose:
|
|
22
|
+
|
|
23
|
+
- Input type.
|
|
24
|
+
- Page order.
|
|
25
|
+
- Page manifest paths.
|
|
26
|
+
- Notes manifest path.
|
|
27
|
+
- Final output path.
|
|
28
|
+
- Run-level image backend contract.
|
|
29
|
+
- Original user request.
|
|
30
|
+
|
|
31
|
+
Key fields:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"schema_version": 1,
|
|
36
|
+
"run_id": "job-id",
|
|
37
|
+
"input_type": "image|images|pdf|pptx",
|
|
38
|
+
"max_concurrent_pages": 6,
|
|
39
|
+
"image_backend": {
|
|
40
|
+
"backend_id": "openai-compatible-api",
|
|
41
|
+
"tool_name": "editppt image",
|
|
42
|
+
"tool_call": "editppt image generate/edit",
|
|
43
|
+
"requires_openai_api_key": false,
|
|
44
|
+
"input_context_policy": "pass every visual reference via editppt image edit --image"
|
|
45
|
+
},
|
|
46
|
+
"pages": [],
|
|
47
|
+
"notes_manifest": "notes_manifest.json",
|
|
48
|
+
"output": "final/origin_edited.pptx"
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`image_backend` is written by `editppt prepare` and may be overwritten by `editppt run backend` when needed. Parent-level backend selection policy lives in `SKILL.md` subsection "Image Backend Selection".
|
|
53
|
+
|
|
54
|
+
New runs record the user-configured Images API. If all configured models fail, keep the page pending until a provider is available. The manifest contains neither the endpoint credentials nor a fallback account.
|
|
55
|
+
|
|
56
|
+
## `page_jobs.json`
|
|
57
|
+
|
|
58
|
+
Owner: created by `editppt prepare`, updated by `editppt run` commands.
|
|
59
|
+
|
|
60
|
+
Purpose:
|
|
61
|
+
|
|
62
|
+
- Source of truth for page state.
|
|
63
|
+
- Dispatch records.
|
|
64
|
+
- Result records.
|
|
65
|
+
|
|
66
|
+
Structure:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"schema_version": 1,
|
|
71
|
+
"run_id": "job-id",
|
|
72
|
+
"max_concurrent_pages": 6,
|
|
73
|
+
"pages": [
|
|
74
|
+
{
|
|
75
|
+
"page_id": "page_001",
|
|
76
|
+
"status": "pending",
|
|
77
|
+
"page_dir": "pages/page_001",
|
|
78
|
+
"page_request": "pages/page_001/page_request.json",
|
|
79
|
+
"source": "pages/page_001/source.png",
|
|
80
|
+
"dispatch": null,
|
|
81
|
+
"result": null
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`dispatch` is written by `editppt run dispatch`. It includes `execution_mode`: `"worker"` for normal page-worker dispatch and `"local"` for the parent agent's single-page local claim; older dispatch records without this field are treated as `"worker"`. A page with status `dispatched` is an active execution lease until explicit completion, failure, cancellation, or lost-worker verification; elapsed time alone does not make it lost. `result` is written by `editppt run record`. `accepted` is written by `editppt run finalize`.
|
|
88
|
+
|
|
89
|
+
## `page_request.json`
|
|
90
|
+
|
|
91
|
+
Owner: `editppt prepare`.
|
|
92
|
+
|
|
93
|
+
Purpose: task boundary for the page worker.
|
|
94
|
+
|
|
95
|
+
Includes:
|
|
96
|
+
|
|
97
|
+
- page id
|
|
98
|
+
- page directory
|
|
99
|
+
- source image
|
|
100
|
+
- slide size
|
|
101
|
+
- content box
|
|
102
|
+
- max concurrent pages
|
|
103
|
+
- allowed write scope
|
|
104
|
+
- required outputs
|
|
105
|
+
- user constraints
|
|
106
|
+
- image backend contract
|
|
107
|
+
|
|
108
|
+
Must not include:
|
|
109
|
+
|
|
110
|
+
- page type prediction
|
|
111
|
+
- `imagegen_required` prediction
|
|
112
|
+
- object-level decisions
|
|
113
|
+
|
|
114
|
+
If the run uses an image backend, `page_request.json` must contain the same `image_backend` object without weakening or reordering its `fallback_policy` or `fallback_order`.
|
|
115
|
+
|
|
116
|
+
`slide` and `content_box` are computed automatically by `editppt prepare`. Inputs close to 16:9 use the standard widescreen canvas; other inputs use a custom canvas converted from the source image pixel dimensions. The agent must copy these two fields into the page `manifest.json` and must not compress, stretch, or recalculate the canvas.
|
|
117
|
+
|
|
118
|
+
## `page_result.json`
|
|
119
|
+
|
|
120
|
+
Owner: created by the page reconstructor, validated by `editppt run record`.
|
|
121
|
+
|
|
122
|
+
Includes:
|
|
123
|
+
|
|
124
|
+
- manifest path
|
|
125
|
+
- imagegen jobs path
|
|
126
|
+
- page pptx path
|
|
127
|
+
- preview path
|
|
128
|
+
- contact sheet path
|
|
129
|
+
- validation path
|
|
130
|
+
- page-local output hashes, which may be supplemented by `editppt run record`
|
|
131
|
+
|
|
132
|
+
`editppt run record` stores output `hashes` and `asset_hashes` under the page entry’s `result` in `page_jobs.json`. Asset keys are run-relative paths from `manifest.images`, and values are SHA-256 digests. Finalization rejects missing or changed recorded files before building. Legacy records without `asset_hashes` retain output-hash checks but cannot verify image freshness.
|
|
133
|
+
|
|
134
|
+
Minimal required shape (paths are relative to the page directory):
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"page_manifest": "manifest.json",
|
|
139
|
+
"imagegen_jobs": "imagegen-jobs.json",
|
|
140
|
+
"page_pptx": "page.pptx",
|
|
141
|
+
"preview": "preview.png",
|
|
142
|
+
"contact_sheet": "split_assets_contact.png",
|
|
143
|
+
"validation": "validation.json",
|
|
144
|
+
"page_result": "page_result.json"
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The `manifest` artifact is the authoritative page source for final assembly. `editppt run finalize` rebuilds the final deck from recorded page manifests in page order. The `page_pptx` artifact remains a page-level deliverability artifact and is validated by `editppt run record`, but it is not the final assembly input.
|
|
149
|
+
|
|
150
|
+
## `pages/page_NNN/validation.json`
|
|
151
|
+
|
|
152
|
+
Owner: created by the page reconstructor, read by `editppt run record`.
|
|
153
|
+
|
|
154
|
+
Purpose: page-level deliverability conclusion.
|
|
155
|
+
|
|
156
|
+
`line_geometry_violations` records mismatches between declared paths/stroke styles and the actual PPTX objects. A non-empty list fails page validation; final deck validation reports these mismatches under `page_contract_violations`.
|
|
157
|
+
|
|
158
|
+
Native table validation report fields:
|
|
159
|
+
|
|
160
|
+
- `native_tables`: number of native table objects in the PPTX.
|
|
161
|
+
- `editable_table_cells`: number of table cells containing native DrawingML text (`a:t`). These cells satisfy editable-text checks, including on table-only pages.
|
|
162
|
+
- `table_structure_violations`: differences between manifest tables and the built PPTX. A non-empty list fails validation; final deck validation also rechecks native table structure.
|
|
163
|
+
|
|
164
|
+
Must contain at top level:
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"passed": true
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
`passed` must be a boolean. `editppt run record` only reads top-level `passed` to decide whether the page can enter final assembly. `status: "pass"`, `runtime_validation.passed`, or other nested fields may remain as supplemental information, but they cannot replace top-level `passed`.
|
|
173
|
+
|
|
174
|
+
## `pages/page_NNN/manifest.json`
|
|
175
|
+
|
|
176
|
+
Owner: page reconstructor.
|
|
177
|
+
|
|
178
|
+
Purpose: source of truth for page-level PPTX construction.
|
|
179
|
+
|
|
180
|
+
The manifest is not a summary of a separately authored `page.pptx`. It is the build contract for both page-level validation and final deck assembly. A page may not pass validation if the page PPTX can only be reproduced by custom page-local code while the manifest lacks object positions.
|
|
181
|
+
|
|
182
|
+
Must contain:
|
|
183
|
+
|
|
184
|
+
- `slide`
|
|
185
|
+
- `content_box`
|
|
186
|
+
- `source`
|
|
187
|
+
- `text_inventory`
|
|
188
|
+
- `visual_inventory`
|
|
189
|
+
- `background_strategy`
|
|
190
|
+
- `quality_checks`
|
|
191
|
+
- `text_boxes`
|
|
192
|
+
- `shapes`
|
|
193
|
+
- `images`
|
|
194
|
+
- `asset_provenance`
|
|
195
|
+
- page strategy
|
|
196
|
+
|
|
197
|
+
`slide`, `content_box`, and `source.width_px/source.height_px` must come from `page_request.json`. All `box_px`, `points_px`, `polygon_px`, and `path_px` point values use `source.png` pixel coordinates; the runtime maps these coordinates into `content_box` instead of stretching them to the whole slide. Coordinate layouts:
|
|
198
|
+
|
|
199
|
+
- `box_px: [x, y, width, height]`
|
|
200
|
+
- `points_px: [x1, y1, x2, y2]`
|
|
201
|
+
|
|
202
|
+
Positioned build object requirements:
|
|
203
|
+
|
|
204
|
+
- Every `text_boxes[]` item must have `box_px`. Text in `text_inventory` does not create a positioned text box.
|
|
205
|
+
- Every `images[]` item must have `box_px`.
|
|
206
|
+
- Every `tables[]` item must have `box_px` with positive width and height.
|
|
207
|
+
- Every non-line `shapes[]` item must have `box_px`.
|
|
208
|
+
- Every line shape must have `points_px`.
|
|
209
|
+
|
|
210
|
+
`text_inventory` and `visual_inventory` are only inventories; they do not substitute for positioned `text_boxes`, `images`, `shapes`, and `tables`. The manifest must be sufficient to rebuild the page without reading any custom page script.
|
|
211
|
+
|
|
212
|
+
Missing coordinates are page-contract violations. The runtime must reject them during `editppt run record` and deck validation because otherwise missing values fall back to default positions such as the top-left corner.
|
|
213
|
+
|
|
214
|
+
**Native tables**
|
|
215
|
+
|
|
216
|
+
`tables` is optional and defaults to `[]`, preserving existing manifests. Each item builds one native DrawingML `a:tbl` object. Object-source decisions live in `page-decision-tree.md` section 3.3, "Structural Primitives and Layout Objects."
|
|
217
|
+
|
|
218
|
+
- `id` optionally names the table; `z_index` defaults to `250`.
|
|
219
|
+
- `box_px: [x, y, width, height]` positions the entire table in source pixels, using the same content-area mapping as other objects.
|
|
220
|
+
- `cells` is a non-empty rectangular two-dimensional array. Each slot is a string or an object with `text`, optional `row_span` / `col_span`, and optional `style`. Spans are positive integers and default to `1`.
|
|
221
|
+
- `column_widths` and `row_heights` are optional lists of positive relative weights, with exactly one weight per column or row. They scale to the table box; omitted lists assign equal sizes.
|
|
222
|
+
- A merged rectangle is declared only in its top-left cell. All covered slots must be `""`, `{}`, or `{"text": ""}`. Overlapping merges, out-of-grid spans, and content or style in covered slots are rejected.
|
|
223
|
+
- `style` on the table supplies cell defaults; `cells[r][c].style` overrides individual fields. Supported fields are `font`, `font_size`, `color`, `bold`, `italic`, `align`, `valign`, `wrap`, `fit_text`, `fill`, `stroke`, `stroke_width`, and `margin_left`, `margin_right`, `margin_top`, `margin_bottom`.
|
|
224
|
+
- Defaults: `font: "PingFang SC"`, `font_size: 18` points, `color: "#111111"`, `align: "left"`, `valign: "top"`, `wrap: "none"`, `fill: "#FFFFFF"`, `stroke: "#000000"`, `stroke_width: 1` point, and each margin `0.05` inches. Font fitting is enabled by default. Alignment values follow "Text alignment" below.
|
|
225
|
+
- Cell strings, including newline-separated text, participate in text coverage validation.
|
|
226
|
+
|
|
227
|
+
Example with a merged header and two data columns:
|
|
228
|
+
|
|
229
|
+
```json
|
|
230
|
+
{
|
|
231
|
+
"tables": [{
|
|
232
|
+
"id": "results",
|
|
233
|
+
"box_px": [80, 120, 640, 180],
|
|
234
|
+
"column_widths": [2, 1],
|
|
235
|
+
"row_heights": [1, 1],
|
|
236
|
+
"style": {"font_size": 16, "valign": "middle"},
|
|
237
|
+
"cells": [
|
|
238
|
+
[{"text": "Results", "col_span": 2, "style": {"bold": true, "fill": "#E8EEF5"}}, ""],
|
|
239
|
+
["Completed", "24"]
|
|
240
|
+
]
|
|
241
|
+
}]
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**Native paths and stroke styles**
|
|
246
|
+
|
|
247
|
+
The object-source and granularity rules live in `page-decision-tree.md` section 3.3, "Structural Primitives and Layout Objects."
|
|
248
|
+
|
|
249
|
+
- `shapes[].type: "path"` requires `box_px` with positive width and height and a non-empty `path_px` command list. It cannot also specify `points_px`, `polygon_px`, `preset`, `flip_h`, or `flip_v`; express its direction in the path coordinates. All point pairs are absolute `source.png` pixel coordinates, not coordinates relative to the box; the runtime maps them into the declared box and slide content area.
|
|
250
|
+
- Each command has `op` and `points`. Supported commands are `moveTo` (one `[x, y]` pair), `lnTo` (one endpoint), `quadBezTo` (one control point followed by the endpoint), `cubicBezTo` (two control points followed by the endpoint), and `close` (empty `points`).
|
|
251
|
+
- The first command is the only `moveTo`; at least one drawing command follows. Optional `close` may occur only once, at the end. All coordinates must be finite numbers. An open path has `fill: "none"`.
|
|
252
|
+
- `dash` defaults to `solid` and accepts `solid`, `dot`, `dash`, `lgDash`, `dashDot`, `lgDashDot`, `lgDashDotDot`, `sysDash`, `sysDot`, `sysDashDot`, or `sysDashDotDot`.
|
|
253
|
+
- `start_arrow` and `end_arrow` default to `none` and accept only `none` or `triangle`. Arrowheads are supported only on `line` shapes and open paths.
|
|
254
|
+
- Optional `semantic_line_id` is a non-empty string identifying one logical line. It must be unique across the page's shapes; repeating it on multiple shapes is a contract violation, including when those shapes are grouped. Omission does not waive the section 3.3 review.
|
|
255
|
+
|
|
256
|
+
Example of one open dashed curve with an endpoint arrow:
|
|
257
|
+
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"type": "path",
|
|
261
|
+
"box_px": [100, 80, 300, 140],
|
|
262
|
+
"semantic_line_id": "trend-projection",
|
|
263
|
+
"path_px": [
|
|
264
|
+
{"op": "moveTo", "points": [[100, 220]]},
|
|
265
|
+
{"op": "cubicBezTo", "points": [[180, 80], [280, 180], [400, 100]]}
|
|
266
|
+
],
|
|
267
|
+
"fill": "none",
|
|
268
|
+
"stroke": "00AACC",
|
|
269
|
+
"stroke_width": 2,
|
|
270
|
+
"dash": "dash",
|
|
271
|
+
"end_arrow": "triangle"
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Text-size fitting:
|
|
276
|
+
|
|
277
|
+
- `text_boxes[].font_size` is treated as the requested font size. The deterministic builder may clamp it downward during normalization when the requested size is too large for the resolved source-pixel box.
|
|
278
|
+
- Keep default fitting enabled for first drafts. Set `fit_text: false` only when the page author has manually calibrated the box and font size.
|
|
279
|
+
- `text_boxes[].box_px` should describe the source text bounds plus modest padding. Do not use an unrelated card, chart, or table cell group as the text box, because the fitter infers size from the supplied box. Badge-centered text is the explicit shared-box exception in `page-decision-tree.md` section 3.6.
|
|
280
|
+
- Optional tuning fields are `min_font_size`, `max_font_size`, `text_fit_safety`, and `line_height`.
|
|
281
|
+
|
|
282
|
+
Text alignment:
|
|
283
|
+
|
|
284
|
+
- `text_boxes[].align` accepts `left`, `center`, or `right` (default `left`). The equivalent DrawingML tokens `l`, `ctr`, and `r` are also accepted.
|
|
285
|
+
- `text_boxes[].valign` accepts `top`, `middle`, or `bottom` (default `top`); `center` is an alias for `middle`. The equivalent DrawingML tokens `t`, `ctr`, and `b` are also accepted.
|
|
286
|
+
- The deterministic builder translates these manifest values to valid DrawingML enum tokens. Unsupported values are page-contract violations instead of silently falling back to an application default.
|
|
287
|
+
|
|
288
|
+
`text_inventory` may be a list of strings or a list of structured objects. In structured objects, the fields used for exact text validation are `text`, `required_text`, `items`, or `texts`; fields such as `id`, `decision`, `description`, and `note` are only records and are not used for exact text matching. Example:
|
|
289
|
+
|
|
290
|
+
```json
|
|
291
|
+
[
|
|
292
|
+
{"id": "title", "text": "Market Overview", "decision": "native-text"},
|
|
293
|
+
{"id": "metrics", "required_text": ["Annual recurring revenue", "42.8M"]}
|
|
294
|
+
]
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
`quality_checks` must include at least:
|
|
298
|
+
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"font_size_calibrated": true,
|
|
302
|
+
"visual_inventory_matched": true,
|
|
303
|
+
"background_strategy_checked": true,
|
|
304
|
+
"shape_corner_geometry_checked": true
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
`background_strategy` must explain at least:
|
|
309
|
+
|
|
310
|
+
- `mode`: `native-or-script`, `source-preserving-local-cleanup`, `imagegen-full-clean-base`, or similar.
|
|
311
|
+
- `source_consistency_contract`: which composition, perspective, object positions, colors, lighting, and key details are preserved.
|
|
312
|
+
- `removed_foreground`: which foreground objects were removed from the background and rebuilt later.
|
|
313
|
+
- `comparison_note`: the background consistency conclusion after comparing the preview against the source.
|
|
314
|
+
|
|
315
|
+
`asset_provenance` requirements — every path referenced in `images[]` must have a matching entry:
|
|
316
|
+
|
|
317
|
+
- `path`: the image path as referenced in `images[]`.
|
|
318
|
+
- `source`: the file the asset was produced from (for separated assets and clean bases this is typically `source.png` or the recorded asset sheet; for formulas the `.tex` file). The referenced file must exist.
|
|
319
|
+
- `source_type`: exactly one of `asset-sheet-separated`, `imagegen`, `latex-rendered-formula`, `user-provided`, `user-approved-rasterization`. No other value passes validation.
|
|
320
|
+
- `provenance_note`: a non-empty explanation of how the asset was produced.
|
|
321
|
+
|
|
322
|
+
New `visual_inventory` entries should declare `role` (`foreground`, `background`, `structure`, or `formula`) and may supply `object_type` (such as `icon` or `photo`). For `role: foreground`, supply `path` matching an image and its `asset_provenance`, plus `source_type` matching that provenance (`asset-sheet-separated` or `imagegen`). Descriptions and provenance notes explain the work; they are not keyword-based proof of the source method. Legacy entries remain supported; prefer these fields for unambiguous classification.
|
|
323
|
+
|
|
324
|
+
`roundRect` shapes must record `source_corner_radius_px`; they may also record `corner_reason`. If the source is a straight-corner rectangle, use `rect`.
|
|
325
|
+
|
|
326
|
+
Recommended record:
|
|
327
|
+
|
|
328
|
+
```json
|
|
329
|
+
{
|
|
330
|
+
"type": "roundRect",
|
|
331
|
+
"box_px": [64, 169, 472, 187],
|
|
332
|
+
"source_corner_radius_px": 12,
|
|
333
|
+
"corner_category": "small-radius",
|
|
334
|
+
"corner_reason": "source card corners are lightly rounded"
|
|
335
|
+
}
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Allowed `corner_category` values: `straight`, `small-radius`, `large-radius`, `pill`. `straight` should not use `roundRect`.
|
|
339
|
+
|
|
340
|
+
`latex-rendered-formula` formula assets must record:
|
|
341
|
+
|
|
342
|
+
```json
|
|
343
|
+
{
|
|
344
|
+
"images": [
|
|
345
|
+
{
|
|
346
|
+
"id": "formula_c2_1",
|
|
347
|
+
"path": "assets/formula_c2_1.svg",
|
|
348
|
+
"box_px": [105, 392, 390, 90],
|
|
349
|
+
"alt": "LaTeX rendered formula formula_c2_1",
|
|
350
|
+
"z_index": 220
|
|
351
|
+
}
|
|
352
|
+
],
|
|
353
|
+
"asset_provenance": [
|
|
354
|
+
{
|
|
355
|
+
"path": "assets/formula_c2_1.svg",
|
|
356
|
+
"source": "assets/formula_c2_1.tex",
|
|
357
|
+
"source_type": "latex-rendered-formula",
|
|
358
|
+
"provenance_note": "Rendered from LaTeX by editppt formula render-latex; visual fidelity is prioritized over formula editability."
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
"formula_inventory": [
|
|
362
|
+
{
|
|
363
|
+
"id": "formula_c2_1",
|
|
364
|
+
"decision": "latex-rendered-image",
|
|
365
|
+
"editable": false,
|
|
366
|
+
"image": "assets/formula_c2_1.svg",
|
|
367
|
+
"tex_source": "assets/formula_c2_1.tex"
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
Formula source decisions and failure handling are defined in `page-decision-tree.md` section 3.2.
|
|
374
|
+
|
|
375
|
+
## `pages/page_NNN/imagegen-jobs.json`
|
|
376
|
+
|
|
377
|
+
Owner: created by `editppt prepare`, updated by `editppt image import` and `editppt image process-sheet` (`generate`/`edit` do not write it — importing the selected output is what records the job).
|
|
378
|
+
|
|
379
|
+
Purpose: record the generation and processing process for clean bases, asset sheets, and selected bitmap assets.
|
|
380
|
+
|
|
381
|
+
Each imported job records at least the selected output and the backend that actually produced it:
|
|
382
|
+
|
|
383
|
+
```json
|
|
384
|
+
{
|
|
385
|
+
"schema_version": 1,
|
|
386
|
+
"jobs": [
|
|
387
|
+
{
|
|
388
|
+
"job_id": "icon-sheet",
|
|
389
|
+
"role": "asset_sheet",
|
|
390
|
+
"status": "recorded",
|
|
391
|
+
"source_image": "/absolute/path/from/tool-output.png",
|
|
392
|
+
"output": "assets/icon-sheet.png",
|
|
393
|
+
"output_sha256": "...",
|
|
394
|
+
"backend": "openai-compatible-api",
|
|
395
|
+
"fallback_reason": null
|
|
396
|
+
}
|
|
397
|
+
]
|
|
398
|
+
}
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
Record `openai-compatible-api` for images from the configured provider. `editppt image import` checks that the output is a readable image and that the recorded producer matches the page contract. Historical runs may retain their original provenance.
|
|
402
|
+
|
|
403
|
+
State and provenance record rules are described in the State Principles section of `SKILL.md` and in the asset processing examples in `cli-helper.md`.
|
|
404
|
+
|
|
405
|
+
## Asset sheet regions and split reports
|
|
406
|
+
|
|
407
|
+
`asset-regions.json` is authored by the page reconstructor after inspecting the generated sheet. It contains `regions`, a nonempty array of `{ "name": "icon-a", "box": [x, y, width, height] }`. Names are unique safe filenames (PNG extension optional); coordinates are integer pixels of the **generated sheet**, not `source.png`. Boxes must have positive size, be inside the image, and not overlap. Each region must contain foreground surrounded by transparent margins; collectively regions cover all nonzero Alpha except the faint-residue allowance below. Empty grid slots are omitted.
|
|
408
|
+
|
|
409
|
+
The split report records `source`, `assets`, and each asset's `path`, `source`, `box`, `padded_box`, `area`, `merged_count`, and `size`; region mode also records `region_box`. Report boxes are `[left, top, right, bottom]` in generated-sheet pixels, unlike the region input's width/height form. `area` in region mode counts all nonzero Alpha pixels. Crops preserve the original RGBA pixels and retain disconnected fragments; padding is clipped to the owning region.
|
|
410
|
+
|
|
411
|
+
If all uncovered pixels together total at most 4 pixels with maximum Alpha 8 (on the 0–255 scale), region splitting accepts them as faint residue and emits `warnings: [{"code": "ignored_faint_residue", "pixel_count": 1, "max_alpha": 1, "box": [x1, y1, x2, y2]}]`. Any foreground touching a region boundary still fails, including a faint connected stroke; larger or more opaque uncovered content also fails. This never thresholds pixels inside a region. The unchanged source sheet retains residue for inspection.
|
|
412
|
+
|
|
413
|
+
## `notes_manifest.json`
|
|
414
|
+
|
|
415
|
+
Owner: created by `editppt prepare`, read by `editppt run finalize`.
|
|
416
|
+
|
|
417
|
+
Purpose:
|
|
418
|
+
|
|
419
|
+
- Original PPT/PPTX speaker notes.
|
|
420
|
+
- Notes hashes.
|
|
421
|
+
- Page mapping.
|
|
422
|
+
|
|
423
|
+
Notes are not handed to page workers, translated, summarized, or rewritten.
|