@contentful/experience-design-system-cli 2.34.5-dev-build-d08439d.0 → 2.34.5-dev-build-75bf00ac.0

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 (109) hide show
  1. package/README.md +34 -275
  2. package/dist/package.json +2 -1
  3. package/dist/src/analytics/constants.d.ts +2 -2
  4. package/dist/src/analytics/index.d.ts +1 -1
  5. package/dist/src/analytics/normalize.d.ts +1 -1
  6. package/dist/src/analytics/types.d.ts +1 -1
  7. package/dist/src/analyze/composition/composition-cache-key.d.ts +2 -3
  8. package/dist/src/analyze/composition/interchange-schema.d.ts +2 -2
  9. package/dist/src/analyze/composition/prompt-loader.d.ts +3 -0
  10. package/dist/src/analyze/composition/resolve-mapping-cli.d.ts +1 -5
  11. package/dist/src/analyze/composition/resolve-mapping.d.ts +7 -8
  12. package/dist/src/analyze/extract-command.d.ts +3 -0
  13. package/dist/src/analyze/select/command.d.ts +3 -25
  14. package/dist/src/analyze/select/preview-annotations.d.ts +6 -6
  15. package/dist/src/analyze/select/tui/components/GotoBanner.d.ts +1 -1
  16. package/dist/src/apply/api-client.d.ts +4 -6
  17. package/dist/src/apply/command.d.ts +25 -4
  18. package/dist/src/apply/preview-utils.d.ts +2 -6
  19. package/dist/src/apply/tokens.d.ts +1 -0
  20. package/dist/src/apply/tui/ServerApplyView.d.ts +3 -6
  21. package/dist/src/apply/tui/ServerPreviewView.d.ts +1 -2
  22. package/dist/src/credentials-store.d.ts +0 -10
  23. package/dist/src/generate/command.d.ts +1 -1
  24. package/dist/src/helpers/read-existing-contentful-entities-from-session.d.ts +1 -1
  25. package/dist/src/import/agent-model-resolve.d.ts +1 -1
  26. package/dist/src/import/composition-options.d.ts +0 -8
  27. package/dist/src/import/tui/CustomPromptBanner.d.ts +1 -2
  28. package/dist/src/import/tui/WizardApp.d.ts +7 -41
  29. package/dist/src/import/tui/final-review-host.d.ts +1 -5
  30. package/dist/src/import/tui/hooks/useReviewPreview.d.ts +1 -2
  31. package/dist/src/import/tui/hooks/useReviewSession.d.ts +21 -0
  32. package/dist/src/import/tui/lineage-input.d.ts +2 -2
  33. package/dist/src/import/tui/preview-confirmation-input.d.ts +1 -2
  34. package/dist/src/import/tui/review-step-props.d.ts +0 -1
  35. package/dist/src/import/tui/runLivePreview.d.ts +0 -3
  36. package/dist/src/import/tui/runScopeGate.d.ts +0 -10
  37. package/dist/src/import/tui/scope-gate-host.d.ts +3 -7
  38. package/dist/src/import/tui/steps/ErrorStep.d.ts +2 -1
  39. package/dist/src/import/tui/steps/GenerateReviewStep.d.ts +1 -1
  40. package/dist/src/import/tui/steps/ScopeGateStep.d.ts +1 -1
  41. package/dist/src/import/tui/steps/WizardPreviewStep.d.ts +2 -6
  42. package/dist/src/import/tui/useFinalizePreview.d.ts +3 -8
  43. package/dist/src/import/tui/useLivePreview.d.ts +2 -4
  44. package/dist/src/import/tui/wizard-422-helpers.d.ts +1 -1
  45. package/dist/src/import/tui/wizard-state-transitions.d.ts +2 -4
  46. package/dist/src/index.js +23547 -30878
  47. package/dist/src/lib/command-options.d.ts +0 -3
  48. package/dist/src/lib/contentful-urls.d.ts +2 -4
  49. package/dist/src/lib/debug-logger.d.ts +0 -2
  50. package/dist/src/runs/fingerprint.d.ts +0 -12
  51. package/dist/src/runs/save-path-resolver.d.ts +0 -46
  52. package/dist/src/runs/store.d.ts +2 -18
  53. package/dist/src/session/cache-keys.d.ts +1 -1
  54. package/dist/src/session/db.d.ts +3 -6
  55. package/dist/src/setup/command.d.ts +1 -2
  56. package/package.json +7 -6
  57. package/skills/generate-components.md +1 -1
  58. package/dist/src/analytics/env.d.ts +0 -2
  59. package/dist/src/analyze/build-analyze-view-rows.d.ts +0 -32
  60. package/dist/src/analyze/command.d.ts +0 -14
  61. package/dist/src/analyze/composition/agent-parser/author-prompt.d.ts +0 -4
  62. package/dist/src/analyze/composition/agent-parser/extract-parser.d.ts +0 -8
  63. package/dist/src/analyze/composition/agent-parser/load-prompt.d.ts +0 -7
  64. package/dist/src/analyze/composition/agent-parser/resolve-via-parser.d.ts +0 -46
  65. package/dist/src/analyze/composition/agent-parser/sandbox.d.ts +0 -45
  66. package/dist/src/analyze/composition/candidate-critic-agent.d.ts +0 -7
  67. package/dist/src/analyze/composition/candidate-critic.d.ts +0 -32
  68. package/dist/src/analyze/select-agent/command.d.ts +0 -4
  69. package/dist/src/analyze/select-agent/context-builder.d.ts +0 -50
  70. package/dist/src/analyze/select-agent/show-rationale.d.ts +0 -9
  71. package/dist/src/analyze/tui/AnalyzeView.d.ts +0 -39
  72. package/dist/src/apply/manifest.d.ts +0 -1
  73. package/dist/src/apply/tui/SelectView.d.ts +0 -18
  74. package/dist/src/generate/edit/command.d.ts +0 -2
  75. package/dist/src/import/auto-filter-resolve.d.ts +0 -3
  76. package/dist/src/import/orchestrator.d.ts +0 -76
  77. package/dist/src/import/picker-dispatch.d.ts +0 -28
  78. package/dist/src/import/print-prompt.d.ts +0 -34
  79. package/dist/src/import/strip-allowed-components.d.ts +0 -18
  80. package/dist/src/import/tui/auto-filter-error.d.ts +0 -1
  81. package/dist/src/import/tui/components/AutoFilterBanner.d.ts +0 -10
  82. package/dist/src/import/tui/merge-ai-decisions.d.ts +0 -5
  83. package/dist/src/import/tui/steps/AtomicGenerateReviewStep.d.ts +0 -28
  84. package/dist/src/import/tui/steps/AtomicScopeGateStep.d.ts +0 -3
  85. package/dist/src/import/tui/wizard-save-flow.d.ts +0 -37
  86. package/dist/src/lib/composition-mode.d.ts +0 -30
  87. package/dist/src/runs/export-helpers.d.ts +0 -5
  88. package/dist/src/runs/ls-command.d.ts +0 -12
  89. package/dist/src/runs/modify-launcher.d.ts +0 -34
  90. package/dist/src/runs/picker-labels.d.ts +0 -24
  91. package/dist/src/runs/push-creds-prompt.d.ts +0 -25
  92. package/dist/src/runs/push-helpers.d.ts +0 -20
  93. package/dist/src/runs/push-launcher.d.ts +0 -52
  94. package/dist/src/runs/replay-helpers.d.ts +0 -71
  95. package/dist/src/runs/resolve-run-target.d.ts +0 -12
  96. package/dist/src/runs/run-picker-mount.d.ts +0 -46
  97. package/dist/src/runs/run-picker.d.ts +0 -18
  98. package/dist/src/runs/staleness.d.ts +0 -38
  99. package/dist/src/runs/wizard-launcher.d.ts +0 -2
  100. package/dist/src/runs/wizard-seed.d.ts +0 -20
  101. package/dist/src/session/cli.d.ts +0 -2
  102. package/dist/src/session/stats.d.ts +0 -26
  103. package/dist/src/setup/auto-filter-prompt.d.ts +0 -13
  104. package/dist/src/setup/composition-mode-prompt.d.ts +0 -14
  105. package/prompts/composition-dir-critic.md +0 -7
  106. package/prompts/composition-parser-repair-empty.md +0 -1
  107. package/prompts/composition-parser-repair-error.md +0 -2
  108. package/prompts/composition-parser.md +0 -49
  109. /package/dist/src/analyze/select/tui/{App.d.ts → LegacySelectApp.d.ts} +0 -0
package/README.md CHANGED
@@ -16,21 +16,15 @@ The rest of this README uses `experiences`.
16
16
 
17
17
  ## CLI Overview
18
18
 
19
- There are two ways to use the CLI:
19
+ The CLI has two primary workflows:
20
20
 
21
- 1. **`experiences import`** — the wizard. Drives the full pipeline (extract → AI select → scope-gate → generate → final-review → save/push) from a single command. Works in two modes: a full-screen interactive TUI in a real terminal, and a non-interactive headless mode when you pass `--auto-accept-scope` plus credentials. **This is the recommended path for almost everyone.**
21
+ 1. **`experiences import`** — the wizard. Drives the full pipeline (extract → AI select → scope-gate → internal generation → final-review → save/push) from a single command in a full-screen interactive TUI. **This is the recommended path for almost everyone.**
22
22
 
23
- 2. **Standalone subcommands** — for piping into other tools, CI parity with the wizard, or for debugging individual steps:
23
+ 2. **`experiences apply`** — applies generated component and token definitions to Contentful.
24
24
 
25
- ```
26
- analyze extract → analyze select-agent → generate components → apply push
27
- ```
25
+ The import wizard owns extraction, selection, generation, validation, and apply orchestration internally; those implementation stages are not exposed as standalone commands.
28
26
 
29
- `analyze select-agent` is the agent-driven selection step the wizard uses. You can replace it with `analyze select` for the older manual JsonEditor TUI.
30
-
31
- **Determinism boundary.** `analyze extract` is fully deterministic: ts-morph AST parsing produces the same component list and prop shape on every run, then a deterministic pre-classifier and a structural non-authorable filter shape the output. AI enters the pipeline at `analyze select-agent` and `generate components`, where coding agents make per-component decisions. This split keeps the extracted artifact reproducible — if an extracted component looks wrong, the cause is in the rules, not in agent variability.
32
-
33
- All intermediate data flows through a local SQLite session database (`~/.contentful/experience-design-system-cli/pipeline.db`). No JSON files are written between steps — each command reads its inputs from the session and writes its outputs back to it. Use `print` to export session data to JSON files on demand. The wizard additionally maintains a separate **runs.json** file (`~/.config/experiences/runs.json`) that records each successful wizard session so it can be replayed later with `--push-from-run` or `--modify`.
27
+ All intermediate data flows through a local SQLite session database (`~/.contentful/experience-design-system-cli/pipeline.db`). No JSON files are written between steps — each pipeline step reads its inputs from the session and writes its outputs back to it.
34
28
 
35
29
  ---
36
30
 
@@ -38,39 +32,30 @@ All intermediate data flows through a local SQLite session database (`~/.content
38
32
 
39
33
  A **composite component** is one that renders other components inside it — a `Card` that slots a `Button` and an `Icon`, a `Tabs` that slots `Tab` panels. When you import composite components, the CLI can populate each slot's `$allowedComponents` so the parent→child relationships survive into Contentful.
40
34
 
41
- ### Atomic vs. composite
42
-
43
- Imports are **atomic by default** — flat components, no embedded hierarchy. This is the right choice when you just want each component registered on its own. Opt into hierarchy resolution with `--composite` (or any composition flag, which implies it).
44
-
45
- | Mode | Flag | Behavior |
46
- |---|---|---|
47
- | Atomic | `--atomic` (default) | Flat import; composition stripped before push |
48
- | Composite | `--composite` | Resolve and import the parent→child hierarchy |
35
+ All imports use composite mode: embedded-component relationships are resolved and preserved in the generated CDF.
49
36
 
50
37
  ### How composition is resolved
51
38
 
52
- Under `--composite`, relationships are resolved from the highest-confidence source available, in this precedence order:
39
+ Relationships are resolved from the highest-confidence source available, in this precedence order:
53
40
 
54
41
  1. **Typed slots (code)** — slots the source already declares, e.g. React `ReactElement<XProps>` / `children`, Svelte `Snippet<[XProps]>`, or an explicit `@allowedComponents` JSDoc tag. Fully deterministic; picked up automatically.
55
- 2. **Mapping map** — a hand-authored parent→children interchange map you feed with `--composition-map <path>`. Use `--generate-map <path>` to emit a skeleton from whatever was resolved, then hand-edit it and feed it back.
56
- 3. **Agent (`--composition-agent`)** — for codebases that encode composition in *code patterns* rather than typed slots (common in real-world design systems). Only runs when the deterministic sources above find nothing.
42
+ 2. **Agent** — direct edge emission for codebases that encode composition in *code patterns* rather than typed slots (common in real-world design systems). It is enabled automatically in composite mode and only runs when the deterministic sources above find nothing.
57
43
 
58
- When more than one source speaks to the same relationship, the higher-precedence one wins (**code slots > map > agent**).
44
+ When more than one source speaks to the same relationship, the higher-precedence one wins (**code slots > agent**).
59
45
 
60
46
  ### The composition agent
61
47
 
62
- `--composition-agent` doesn't ask the model to *list* relationships (which would be non-deterministic and unauditable). Instead the agent **writes a small parser** — a pure `(ctx) => Edge[]` function — which the CLI runs in a locked-down sandbox (separate process, no filesystem/network, memory + wall-clock limits), caches by the parser's own source, and replays. Repeated runs over the same code are stable and inspectable.
48
+ The composition agent emits one structured edge per relationship. The CLI validates component names and merges those edges with deterministic sources by provenance and precedence.
63
49
 
64
- - `--composition-agent-mode <parser|edges>` — `parser` (default; the sandboxed-parser design above) or `edges` (agent lists relationships directly; less robust).
65
- - `--composition-refresh` — ignore the cache and re-resolve from scratch, forcing the agent to run.
50
+ - `--no-cache` — ignore caches and re-resolve composition from scratch, forcing the agent to run.
66
51
  - `--agent <name>` — which coding agent authors the parser (`claude`, `codex`, `opencode`, `cursor`, `copilot`).
67
52
  - `--prompt composition=<file-or-text>` — override the composition stage's prompt.
68
53
 
69
- Because the agent path spawns a coding agent, it adds latency and cost and is best-effort (parser quality can vary run to run). For reproducible results, prefer `--composition-map`.
54
+ Because the agent path spawns a coding agent, it adds latency and cost and is best-effort.
70
55
 
71
56
  ### Slot cycles
72
57
 
73
- If the resolved graph contains a circular slot dependency (A slots B, B slots A), it is detected before push. `apply push` and the wizard's push path **refuse to send a manifest with cycles**; the cycle path is reported so you can break it. In headless `import`, pass `--auto-reject-cycles` to auto-reject the components in a cycle and retry instead of failing.
58
+ If the resolved graph contains a circular slot dependency (A slots B, B slots A), it is detected before push. `apply` and the wizard's push path **refuse to send a manifest with cycles**; the cycle path is reported so you can break it.
74
59
 
75
60
  ---
76
61
 
@@ -78,7 +63,7 @@ If the resolved graph contains a circular slot dependency (A slots B, B slots A)
78
63
 
79
64
  ### Coding agent
80
65
 
81
- `generate components` (and `generate tokens`) requires a coding agent CLI in your `$PATH`. Choose one:
66
+ The import wizard's generation steps require a coding agent CLI in your `$PATH`. Choose one:
82
67
 
83
68
  | Agent | Install | Auth |
84
69
  |---|---|---|
@@ -94,7 +79,7 @@ The CLI invokes the agent non-interactively in a subprocess. If the binary is no
94
79
 
95
80
  ### Contentful credentials
96
81
 
97
- `apply preview`, `apply select`, `apply push`, and `import` (when pushing) require access to a Contentful space. Set these environment variables or pass the equivalent flags:
82
+ `apply` and `import` (when pushing) require access to a Contentful space. Configure these environment variables or run `experiences setup`:
98
83
 
99
84
  ```bash
100
85
  export CONTENTFUL_MANAGEMENT_TOKEN=<your-cma-token> # required
@@ -114,21 +99,21 @@ In the wizard's credentials step you can press `[s] Skip` to save-only without p
114
99
  experiences import [flags]
115
100
  ```
116
101
 
117
- `experiences import` is the primary entry point. In a TTY it launches a full-screen wizard. In headless mode (any of `--auto-accept-scope`, `--skip-apply`, `--skip-analyze`, `--skip-generate`, `--yes`, `--dry-run`, or credential flags) it runs non-interactively. Without either, it fails loud rather than hanging.
102
+ `experiences import` is the primary entry point and launches a full-screen wizard in a supported interactive terminal.
118
103
 
119
104
  ### Wizard step machine
120
105
 
121
106
  ```
122
107
  welcome
123
108
  ↓
124
- extracting — runs analyze extract (atomic by default; resolves composition
125
- under --composite, see below); spawns generate in parallel (prefetch)
109
+ extracting — runs analyze extract with composite relationships enabled;
110
+ spawns internal generation in parallel (prefetch)
126
111
  ↓
127
- [auto-filter] — analyze select-agent runs automatically (skip with --no-auto-filter)
112
+ [auto-filter] — analyze select-agent runs automatically
128
113
  ↓
129
114
  scope-gate — single human review gate: confirm AI selection, toggle components
130
115
  ↓
131
- credentials — operator types space-id / env / token (generate is already running)
116
+ credentials — operator reviews the prefilled space-id / env / token (internal generation is already running)
132
117
  press [s] Skip to save-only without pushing
133
118
  ↓
134
119
  final-review — minimum-viable port of the JsonEditor; edit names, $description,
@@ -145,93 +130,27 @@ There is now a single human review gate (`scope-gate`) before generation; the le
145
130
 
146
131
  ### Configurable AI auto-filter
147
132
 
148
- The auto-filter (`analyze select-agent` invoked before scope-gate) is on by default. Override per-run with `--auto-filter` / `--no-auto-filter`; the value last selected in the wizard is persisted to `credentials.json` so subsequent runs default to your last choice.
133
+ The auto-filter (`analyze select-agent` invoked before scope-gate) is on by default; the value selected in setup is persisted to `credentials.json` so subsequent runs default to your saved preference.
149
134
 
150
135
  ### Save-and-push default
151
136
 
152
- The push-decision-gate defaults to **save AND push**: it writes `components.json` and `tokens.json` to disk *and* pushes to Contentful in one step. Use `--no-save` to push-only or `--no-push` to save-only. `--out-dir <path>` picks the save directory non-interactively (otherwise the wizard prompts).
153
-
154
- ### Replaying prior runs
155
-
156
- After every successful wizard session, the CLI appends a record to `~/.config/experiences/runs.json` and prints a teaser pointing at the run-id. Subsequent invocations can reuse that record:
157
-
158
- | Flag | What it does |
159
- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
160
- | `--push-from-run <id-or-path>` | Re-push the recorded session to Contentful without re-opening the wizard or writing to disk. Mutually exclusive with `--modify`, `--project`, `--no-save`, `--no-push`. |
161
- | `--modify <id-or-path>` | Re-open the wizard at final-review with the prior run pre-populated. Pair with `--overwrite` (save back to recorded `savePath`) or `--save-as-new` (prompt for new path). |
162
- | `--overwrite` / `--save-as-new` | Save-mode selector for `--modify`; mutually exclusive with each other. |
163
-
164
- Both flags accept either a run id or a filesystem path that matches a recorded `savePath`.
137
+ The push-decision-gate defaults to **save AND push**: it writes `components.json` and `tokens.json` to disk *and* pushes to Contentful in one step.
165
138
 
166
139
  ### Custom skill prompts
167
140
 
168
- Pass `--select-prompt-path <path>` and/or `--generate-prompt-path <path>` to swap in a custom `.md` skill prompt instead of the bundled one. The CLI emits a banner at agent invocation noting the override. Paths can also be saved via `experiences setup`.
141
+ Custom `.md` skill prompt paths can be saved via `experiences setup`; the CLI emits a banner at agent invocation when an override is active.
169
142
 
170
143
  ### Flag reference — `experiences import`
171
144
 
172
145
  | Flag | Default | Description |
173
146
  | --------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
174
- | `--space-id <id>` | `CONTENTFUL_SPACE_ID` env / saved | Contentful space ID (required unless `--skip-apply` / `--no-push`) |
175
- | `--environment-id <id>` | `CONTENTFUL_ENVIRONMENT_ID` env | Contentful environment ID |
176
- | `--cma-token <token>` | `CONTENTFUL_MANAGEMENT_TOKEN` env | CMA personal access token |
177
147
  | `--project <path>` | `.` | Project root to analyze |
178
- | `--out <path>` | `<project>/.contentful` | Headless-mode output directory |
179
- | `--out-dir <path>` | _(prompt)_ | Save directory for `components.json` / `tokens.json`; bypasses inline save-path prompt |
180
- | `--agent <name>` | saved by setup / `claude` | Agent for `analyze select-agent` and `generate components` |
148
+ | `--agent <name>` | saved by setup / `claude` | Agent for `analyze select-agent` and internal generation |
181
149
  | `--model <name>` | agent default | Model name |
182
- | `--tokens <path>` | — | DTCG `tokens.json` to push alongside generated components |
183
- | `--auto-accept-scope` | off | Accept all extracted components without prompting (required for non-TTY without other headless flags) |
184
- | `--atomic` | **default** | Flat import, no embedded-component hierarchy (composition stripped on push) |
185
- | `--composite` | — | Import the embedded-component hierarchy (any composition flag implies this) |
186
- | `--composition-map <path>` | — | Consume a hand-authored parent→children interchange map (implies `--composite`) |
187
- | `--generate-map <path>` | — | Also write a composition-map skeleton from the resolved composition (implies `--composite`) |
188
- | `--composition-agent` | — | Opt into agentic resolution when deterministic sources find no groups (implies `--composite`) |
189
- | `--composition-refresh` | — | Bypass the composition cache and re-resolve from scratch, forcing the agent to run (implies `--composite`) |
190
- | `--composition-agent-mode <mode>` | `parser` | `parser` (agent writes a sandboxed parser) or `edges` (agent lists edges directly) |
150
+ | `--composition-map <path>` | — | Consume a hand-authored parent→children interchange map |
191
151
  | `--prompt <stage=value>` | — | Override a stage prompt (repeatable); value is a file path or literal text, e.g. `--prompt composition=./p.md` |
192
- | `--auto-reject-cycles` | off (fail loud) | Auto-reject components in slot cycles and retry, instead of stopping with the cycle path |
193
- | `--auto-filter` / `--no-auto-filter` | persisted in `credentials.json` | Force AI auto-filter on or off; overrides saved preference |
194
- | `--no-live-preview` | live preview on | Skip the automatic preview re-run after each FieldEditor save |
195
- | `--no-push` | push on | Run extract → scope-gate → generate → final-review and exit without pushing |
196
- | `--no-save` | save on | Push without writing `components.json` / `tokens.json` to disk |
197
- | `--push-from-run <id-or-path>` | — | Re-push a prior run; never writes to disk |
198
- | `--modify <id-or-path>` | — | Re-open the wizard at final-review with a prior run loaded |
199
- | `--overwrite` | — | With `--modify`: save back to recorded `savePath` |
200
- | `--save-as-new` | — | With `--modify`: always save to a new path |
201
- | `--select-prompt-path <path>` | saved by setup | Custom `.md` skill prompt for `analyze select-agent` |
202
- | `--generate-prompt-path <path>` | saved by setup | Custom `.md` skill prompt for `generate components` |
203
- | `--select-all` | — | Headless: accept all extracted components (bypasses agentic select) |
204
- | `--select <pattern>` | — | Headless: accept components matching pattern (repeatable; bypasses agentic select) |
205
- | `--deselect <pattern>` | — | Headless: reject components matching pattern (repeatable; bypasses agentic select) |
206
- | `--skip-analyze` | — | Reuse most recent `analyze extract` session |
207
- | `--skip-generate` | — | Reuse most recent `generate components` session |
208
- | `--print` | — | Headless: write `components.json` to `--out` after generation |
209
- | `--skip-map-tokens` | — | Skip the `map tokens` step between generate and apply |
210
- | `--skip-apply` | — | Stop after generate; do not push |
211
- | `--no-cache` | cache on | Bypass extract/select/generate/map-tokens fine-grained caches and force re-run; forwarded to `analyze select-agent`, `generate components`, and `map tokens` |
212
- | `--yes` | — | Skip interactive confirmation in `apply push` |
213
- | `--verbose` | — | Show full agent output and all entity progress |
214
- | `--exclude-invalid` | off (fail loud) | Auto-reject components with validation errors instead of refusing to proceed |
215
- | `--viewports <path>` | catch-all viewport | JSON file with viewport array (passed to `apply push`) |
216
- | `--host <url>` | `https://api.contentful.com` | Override API base URL |
217
- | `--on-conflict <mode>` | _(prompt via `<SaveConflictGate>`)_ | Headless conflict resolution when a file already exists at the save path: `overwrite`, `skip`, or `fail`. Bypasses the wizard's interactive save-conflict gate. Mutex with `--no-save`. |
218
- | `--print-prompt` | — | Print the generate prompt to stdout and exit. Replaces the prompt-print semantics of `--dry-run`. |
219
- | `--allow-deletions` | off (non-destructive) | Allow the push to delete remote ComponentTypes/DesignTokens missing from the manifest. Default skips them instead of deleting. Without this flag, preview responses suppress the removed-entity list and return a count instead; interactive confirm screens show an opt-out toggle (never opt-in) only when the flag is passed. Forwarded to headless subprocess pushes and `--push-from-run`. |
220
- | `--dry-run` | _(deprecated)_ | Deprecated alias for `--print-prompt`. Emits a stderr deprecation notice; prompt-print semantics will be removed in a future release. |
221
-
222
- ### Run-picker at wizard start
223
-
224
- When `~/.config/experiences/runs.json` contains one or more entries, none of `--push-from-run`, `--modify`, or `--project` was passed, and stdin is a TTY, the wizard opens with an interactive **run picker** before the welcome step. The operator can:
225
-
226
- - Pick a recent run, then choose **Push** or **Modify** — equivalent to invoking `--push-from-run` or `--modify` for that run id
227
- - Select **Show all** to expand beyond the most-recent rows
228
- - Select **Start a new run** to fall through to the normal `welcome → extracting → ...` flow
229
-
230
- The mount decision is deterministic — passing any of `--push-from-run`, `--modify`, or `--project` skips the picker and lands on the existing step machine.
231
-
232
- ### `--modify` end-to-end behavior
233
-
234
- `--modify <id-or-path>` is fully wired: the wizard loads the recorded session from `pipeline.db` (skipping extract and generate entirely), pre-fills credentials from the run record's `pushedTo` target, and lands directly on `final-review` — or on `scope-gate` if the run record carries an `entryStep` hint. Pair with `--overwrite` or `--save-as-new` to control the save target.
152
+ | `--skip-map-tokens` | — | Skip the `map tokens` step between internal generation and apply |
153
+ | `--no-cache` | cache on | Bypass extract/select/internal-generation/map-tokens/composition caches and force re-run |
235
154
 
236
155
  ### `--model` and `--agent` overrides
237
156
 
@@ -245,156 +164,6 @@ The mount decision is deterministic — passing any of `--push-from-run`, `--mod
245
164
 
246
165
  ---
247
166
 
248
- ## `experiences runs`
249
-
250
- List recorded wizard runs from `~/.config/experiences/runs.json`, or print the detail view for a single run.
251
-
252
- ```bash
253
- experiences runs [<id-or-path>] [--project <path>] [--limit <n>] [--pushed | --not-pushed] [--json]
254
- ```
255
-
256
- | Option | Description |
257
- | ------------------- | ---------------------------------------------------------------------------------------- |
258
- | `<id-or-path>` | Positional. Print the detail view for a single run by id or recorded save path. Path resolution sniffs for `/`, `./`, or `~/` prefix (and the bare `.` / `~` values) via `resolveRunTarget()`. |
259
- | `--project <path>` | Filter by source project path (absolute). |
260
- | `--limit <n>` | Cap the number of rows printed. |
261
- | `--pushed` | Show only runs that were pushed to Contentful. Mutex with `--not-pushed`. |
262
- | `--not-pushed` | Show only runs that were never pushed. Mutex with `--pushed`. |
263
- | `--json` | Emit machine-readable output: `RunRecord[]` for the list view; a single `RunRecord` object when combined with `<id-or-path>`. |
264
-
265
- Each row prints the run id, creation time, project path, save path, component count, and push target (or `(not pushed)`). Table columns auto-expand to fit content — long project / save paths are no longer truncated. Below the table, a copy-friendly footer prints command hints (`--push-from-run`, `--modify`) for the newest run.
266
-
267
- Pair with `--push-from-run` or `--modify` on `experiences import` to replay a row.
268
-
269
- ---
270
-
271
- ## Standalone subcommands
272
-
273
- The standalone subcommands below are pinned by snapshot test (`test/analyze/select-flags.test.ts` and friends) and remain backwards-compatible. The wizard internally calls these same commands.
274
-
275
- ### `analyze extract`
276
-
277
- Extract component definitions from a project source tree.
278
-
279
- ```bash
280
- experiences analyze extract --project <path> [--dir <src-dir>] [composition flags]
281
- ```
282
-
283
- | Option | Default | Description |
284
- |---|---|---|
285
- | `--project <path>` | _(required)_ | Path to the project root |
286
- | `--dir <path>` | `src` (falls back to project root) | Source directory relative to project root |
287
- | `--resolve-unreachable <mode>` | `auto` | Retry pass for unresolved Svelte `Props` types: `auto`, `always`, or `never` |
288
- | `--atomic` | **default** | Skip composition resolution — flat components only |
289
- | `--composite` | — | Resolve embedded-component composition (any composition flag implies this) |
290
- | `--composition-map <path>` | — | Consume a hand-authored parent→children interchange map (implies `--composite`) |
291
- | `--generate-map <path>` | — | Write a skeleton interchange map from the resolved composition (implies `--composite`) |
292
- | `--composition-agent` | — | Opt into agentic resolution when deterministic sources find no groups (implies `--composite`) |
293
- | `--composition-refresh` | — | Bypass the composition cache and re-resolve from scratch, forcing the agent to run (implies `--composite`) |
294
- | `--composition-agent-mode <mode>` | `parser` | `parser` (agent writes a sandboxed parser — deterministic) or `edges` (agent lists edges directly) |
295
- | `--agent <name>` | saved by setup | Coding agent for composition resolution: `claude`, `codex`, `opencode`, `cursor`, `copilot` |
296
- | `--prompt <stage=value>` | — | Override a stage prompt (repeatable); value is a file path or literal text, e.g. `--prompt composition=./p.md` |
297
-
298
- Scans `.tsx`, `.ts`, `.jsx`, `.js`, `.vue`, and `.astro` files. Ignores `node_modules`, `dist`, `build`, `.next`, `.nuxt`, `coverage`, `storybook-static`, `out`, `demo(s)`, and `example(s)` directories. Also ignores `*.stories.*`, `*.story.*`, `*.spec.*`, and `*.test.*` files.
299
-
300
- Writes extracted components to the session database and prints `session=<id>` to stdout. In an interactive terminal, a scrollable TUI displays the extraction summary; press `q` or `Enter` to exit.
301
-
302
- The deterministic non-authorable filter drops infrastructure components with no authoring surface (Context providers, refs-only wrappers, etc.); each drop is reported as a warning so the operator can audit.
303
-
304
- Extraction is **atomic by default** — flat components, no embedded hierarchy. See [Composite components & composition](#composite-components--composition) for how `--composite` and the composition flags resolve parent→child relationships.
305
-
306
- ---
307
-
308
- ### `analyze select`
309
-
310
- Standalone JsonEditor TUI for picking which components to include. Alias: `analyze edit`. **Untouched by the wizard rebuild** — the rich full-screen editor remains the way to operate outside the wizard.
311
-
312
- ```bash
313
- experiences analyze select [--session <id>] [--project-root <path>]
314
- ```
315
-
316
- | Option | Default | Description |
317
- |---|---|---|
318
- | `--session <id>` | most recent completed `analyze extract` | Session ID from `analyze extract` |
319
- | `--project-root <path>` | `cwd` | Project root for resolving component source files |
320
- | `--select-all` | — | Select all components without launching the TUI |
321
- | `--select <pattern>` | — | Select components whose name contains pattern (repeatable) |
322
- | `--deselect <pattern>` | — | Deselect components whose name contains pattern (repeatable) |
323
- | `--accept-all` | — | Alias for `--select-all` |
324
- | `--reject <pattern>` | — | Alias for `--deselect <pattern>` (repeatable) |
325
- | `--patch <path>` | — | Path to a JSON patch file for structured overrides |
326
- | `--exclude-invalid` | — | With `--select-all`: auto-reject components with validation errors |
327
- | `--exclude-components <names>` | — | Comma-separated names to force-reject regardless of other flags |
328
-
329
- Without any non-interactive flag, launches a full-screen TUI requiring 60+ columns. Keyboard reference and patch-file format are unchanged from prior releases.
330
-
331
- ---
332
-
333
- ### `analyze select-agent`
334
-
335
- Use an AI agent to decide which extracted components belong in Contentful Experience Orchestration. Runs one agent invocation per component at configurable concurrency.
336
-
337
- ```bash
338
- experiences analyze select-agent [--agent <name>] [--session <id>]
339
- ```
340
-
341
- | Option | Default | Description |
342
- |---|---|---|
343
- | `--agent <name>` | saved by `experiences setup` | Agent: `claude`, `codex`, `opencode`, `cursor`, or `copilot` |
344
- | `--session <id>` | most recent completed `analyze extract` | Session ID from `analyze extract` |
345
- | `--project-root <path>` | `cwd` | Project root for resolving component source files |
346
- | `--model <name>` | agent default | Model to use |
347
- | `--verbose` | — | Show full agent output including reasoning text |
348
- | `--dry-run` | — | Print the prompt for the first component without invoking the agent |
349
- | `--exclude-invalid` | — | Auto-reject components with validation errors instead of failing loud |
350
- | `--select-prompt-path <path>` | saved by setup | Custom `.md` skill prompt (bypasses bundled invariants); emits a banner at invocation |
351
- | `--no-select-cache` | cache on | Skip the per-component select cache and re-LLM every component |
352
- | `--no-cache` | cache on | Skip all fine-grained caches (extract, select, generate) |
353
- | `--show-rationale` | — | Read-only mode. Print the recorded accept / reject rationale for every component in the session and exit. Reads `raw_components.reject_reason` from the pipeline DB — no LLM call, no schema change. |
354
- | `--json` | — | With `--show-rationale`: emit the rationale rows as JSON for scripting. |
355
-
356
- Decisions are written to the same review state file used by `analyze select`, so `generate components` picks them up automatically. Each `(component-hash, prompt-hash, cli-version)` triple is cached; changing the prompt file via `--select-prompt-path` already busts the corresponding cache entries.
357
-
358
- `--show-rationale` is a separate read-only mode — it does not invoke the agent and is safe to run against a completed session at any time. Pair with `--session <id>` to target a specific session; otherwise it auto-resolves to the most recent completed `analyze extract`.
359
-
360
- ---
361
-
362
- ### `generate components`
363
-
364
- Invoke a coding agent to generate CDF component definitions. Results are stored in the session database.
365
-
366
- ```bash
367
- experiences generate components [--agent <name>] [--session <id>]
368
- ```
369
-
370
- | Option | Default | Description |
371
- |---|---|---|
372
- | `--agent <name>` | saved by setup | Agent: `claude`, `codex`, `opencode`, `cursor`, or `copilot` |
373
- | `--session <id>` | most recent completed `analyze extract` | Session ID from `analyze extract` |
374
- | `--tokens <path>` | — | Path to `tokens.json` for token-linked prop resolution |
375
- | `--token-map <path>` | — | Path to `token-name-map.json` sidecar |
376
- | `--model <name>` | agent default | Model to use |
377
- | `--verbose` | — | Show full agent output |
378
- | `--dry-run` | — | Print the prompt without invoking the agent |
379
- | `--generate-prompt-path <path>` | saved by setup | Custom `.md` skill prompt; emits a banner at invocation |
380
- | `--no-cache` | cache on | Bypass all fine-grained caches and force re-run |
381
-
382
- Raw components are loaded from the session database and embedded directly in the prompt — no intermediate file is read. The agent emits one JSON tool-call object per line; per-component results (CDF body + LLM rationale + source location) are persisted to the session DB.
383
-
384
- ---
385
-
386
- ### `generate components edit` / `generate tokens edit`
387
-
388
- Non-interactive correction of generated output via `--accept-all`, `--reject`, or `--patch`. The interactive TUI variant is not currently shipped.
389
-
390
- ---
391
-
392
- ### `generate tokens`
393
-
394
- Same shape as `generate components`, plus `--raw-tokens <path>`.
395
-
396
- ---
397
-
398
167
  ### `print components` / `print tokens` / `print validate`
399
168
 
400
169
  Unchanged from prior releases.
@@ -409,36 +178,26 @@ experiences print validate [--components <path>] [--tokens <path>]
409
178
 
410
179
  ---
411
180
 
412
- ### `apply preview` / `apply select` / `apply push`
181
+ ### `apply`
413
182
 
414
- These subcommands are the non-wizard route to the same diff and push logic. Flag surfaces are unchanged.
183
+ This command is the non-wizard route to the same diff and push logic. It accepts one CDF file containing all component and design token definitions.
415
184
 
416
- `apply push` and `apply select` now emit a Contentful webapp view URL for the imported components in their JSON summary (`viewUrl`) so callers can deep-link into the management UI after a successful push.
185
+ `apply` emits a Contentful webapp view URL for the imported components in its JSON summary (`viewUrl`) so callers can deep-link into the management UI after a successful push.
417
186
 
418
187
  ```bash
419
- experiences apply preview --space-id <id> --environment-id <env> --session <id>
420
- experiences apply select --space-id <id> --environment-id <env> --session <id>
421
- experiences apply push --space-id <id> --environment-id <env> --session <id> [--yes]
188
+ experiences apply <file>
422
189
  ```
423
190
 
424
- Shared flags: `--components`, `--tokens`, `--session`, `--space-id`, `--environment-id`, `--cma-token`, `--host`, `--viewports`. `apply preview` adds `--include-unchanged`. `apply select` adds `--select-all`, `--select`, `--deselect`, `--force`, `--allow-deletions`. `apply push` adds `--yes`, `--verbose`, `--force`, `--dry-run`, `--allow-deletions`. By default, remote ComponentTypes and DesignTokens missing from the pushed manifest are skipped, not deleted; pass `--allow-deletions` to restore the prior delete behavior.
191
+ `apply` is interactive and loads credentials from `experiences setup` or environment variables. Remote ComponentTypes and DesignTokens missing from the pushed manifest are always skipped.
425
192
 
426
193
  Design tokens are written first (component types may reference token kinds). Each entity write is recorded in the session database atomically — interrupted pushes resume from where they left off.
427
194
 
428
195
  ---
429
196
 
430
- ### `session list` / `session show` / `session stats` / `session prune`
431
-
432
- Lower-level pipeline-session management. Unchanged from prior releases; see `experiences session --help` for the full flag surface. Most operators should use `experiences runs` instead.
433
-
434
- ---
435
-
436
197
  ## Session Database
437
198
 
438
199
  All pipeline state is stored in `~/.contentful/experience-design-system-cli/pipeline.db` (SQLite). The path can be overridden with the `EDS_PIPELINE_DB_PATH` environment variable. The push-resumption database is at `~/.contentful/experience-design-system-cli/import.db` (override with `EDS_IMPORT_DB_PATH`).
439
200
 
440
- Wizard run history is separate: `~/.config/experiences/runs.json`.
441
-
442
201
  ---
443
202
 
444
203
  ## Terminal Compatibility
@@ -447,9 +206,9 @@ Wizard run history is separate: `~/.config/experiences/runs.json`.
447
206
  - 80+ columns recommended for full sidebar + detail view
448
207
  - 120+ columns required to show the source code panel in `analyze select`
449
208
  - `NO_COLOR=1` suppresses all ANSI color output
450
- - Interactive views require both stdin and stdout to be TTYs and stdin to support raw mode. Read-only views fall back to plain or JSON output when those capabilities are unavailable; commands that require input stop with the relevant non-interactive flags in the error message.
209
+ - Interactive views require both stdin and stdout to be TTYs and stdin to support raw mode.
451
210
  - On Windows, use Windows Terminal with PowerShell. Older ConEmu and cmd.exe hosts may not provide the raw-mode support the interactive UI needs.
452
- - To avoid the interactive UI, use the command's non-interactive options: `import --yes` (with credentials) or `import --no-push --auto-accept-scope`, `analyze select --select-all`, `apply select --select-all`, and `apply push --yes`.
211
+ - `experiences import` does not provide a non-interactive execution mode.
453
212
 
454
213
  ---
455
214
 
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.34.5-dev-build-d08439d.0",
3
+ "version": "2.34.5-dev-build-75bf00ac.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -44,6 +44,7 @@
44
44
  "@vue/compiler-sfc": "^3.5.31",
45
45
  "commander": "^13.1.0",
46
46
  "contentful-management": "^12.17.0",
47
+ "figures": "6.1.0",
47
48
  "ink": "^5.2.1",
48
49
  "react": "^18.3.1",
49
50
  "react-devtools-core": "^4.19.1",
@@ -1,4 +1,4 @@
1
- /** Parent pipeline session id propagated to orchestrator subprocesses. */
1
+ /** Parent pipeline session id propagated to subprocesses. */
2
2
  export declare const ANALYTICS_SESSION_ENV = "EDS_ANALYTICS_SESSION_ID";
3
- /** Set when a command is spawned by the import orchestrator. */
3
+ /** Set when a command is spawned by another CLI command. */
4
4
  export declare const IMPORT_PIPELINE_ENV = "EDS_IMPORT_PIPELINE";
@@ -1,6 +1,6 @@
1
1
  export { exitWithAnalytics, failureFromApiError } from './exit.js';
2
2
  export { flushAnalytics, setPersistedAnalyticsDisabled } from './client.js';
3
3
  export { isPipelineAnalyticsChild } from './session.js';
4
- export { bindAnalyticsSession, bindAnalyticsSessionId, completeActiveCommand, emitSessionStarted, enrichCommandResult, failActiveCommand, noteCommandStart, } from './tracker.js';
4
+ export { bindAnalyticsSessionId, completeActiveCommand, emitSessionStarted, enrichCommandResult, failActiveCommand, noteCommandStart, } from './tracker.js';
5
5
  export { recordApplyOutcome, recordContentfulContext } from './apply.js';
6
6
  export type { CommandFailure } from './types.js';
@@ -1,3 +1,3 @@
1
1
  import type { DsiCliCommand } from './types.js';
2
- /** Map a Commander command chain (e.g. "apply push") to a tracked command id, if any. */
2
+ /** Map a Commander command chain (e.g. "apply") to a tracked command id, if any. */
3
3
  export declare function normalizeCommand(commandChain: string): DsiCliCommand | undefined;
@@ -1,5 +1,5 @@
1
1
  /** Tracked CLI commands — closed set aligned with the published event schema. */
2
- export type DsiCliCommand = 'analyze_extract' | 'analyze_select' | 'generate_components' | 'generate_tokens' | 'generate_edit' | 'map_tokens' | 'apply_preview' | 'apply_select' | 'apply_push' | 'print_components' | 'print_tokens' | 'import';
2
+ export type DsiCliCommand = 'analyze_extract' | 'analyze_select' | 'generate_components' | 'generate_tokens' | 'map_tokens' | 'apply_push' | 'print_components' | 'print_tokens' | 'import';
3
3
  export type EntryCommand = 'analyze_extract' | 'import';
4
4
  export type OsName = 'macOS' | 'Linux' | 'Windows' | 'Android' | 'other';
5
5
  export type WriteResult = {
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Derive the `input_hash` for a composition-cache entry (stored in the pipeline
3
3
  * DB's `composition_cache` table). Content-addresses the candidate file set
4
- * (order-independent) plus the producing agent and the resolution kind, so a
5
- * re-run over unchanged files reuses the (token-costly) agent output.
4
+ * (order-independent) plus the producing agent, so a re-run over unchanged
5
+ * files reuses the (token-costly) agent output.
6
6
  *
7
7
  * Content-hashing — not mtime — means a no-op `git checkout` that only bumps
8
8
  * mtime is still a hit. Prompt/skill changes are handled by the `cli_version`
@@ -15,5 +15,4 @@ export declare function buildCompositionInputHash(input: {
15
15
  content: string;
16
16
  }>;
17
17
  agent: string;
18
- kind: 'parser' | 'edges';
19
18
  }): string;
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Two views of the same data:
5
5
  * - `InterchangeMap` — the human-authored / on-disk `{ version, groups }`
6
- * shape (parent → children). This is what `--composition-map` consumes and
7
- * `--generate-map` emits.
6
+ * shape (parent → children), consumed by the composition-map option.
7
+ * `--composition-map` consumes and the resolver can emit.
8
8
  * - `CompositionEdge[]` — the flat internal runtime view, one edge per
9
9
  * parent→child relationship, carrying optional `slot` (T7), `confidence`,
10
10
  * and `provenance`. Easier to merge/dedupe across sources (T2).
@@ -0,0 +1,3 @@
1
+ /** Resolve a bundled composition prompt from the package-root prompts directory. */
2
+ export declare function resolvePromptPath(fileName: string): string;
3
+ export declare function loadPrompt(fileName: string): string;
@@ -2,9 +2,7 @@ import { type InterchangeMap } from './interchange-schema.js';
2
2
  export type CompositionCliOptions = {
3
3
  /** `--composition-map <path>` — hand-authored interchange file. */
4
4
  compositionMap?: string;
5
- /** `--composition-agent` — opt into agentic resolution. */
6
- compositionAgent?: boolean;
7
- /** `--composition-refresh` — force the agent to run even over resolved residue. */
5
+ /** `--composition-refresh` — force edge emission to run even over resolved residue. */
8
6
  compositionRefresh?: boolean;
9
7
  };
10
8
  export type LoadUserMapResult = {
@@ -14,10 +12,8 @@ export type LoadUserMapResult = {
14
12
  ok: false;
15
13
  error: string;
16
14
  };
17
- /** Read + validate a hand-authored interchange map (spec T1 / §1.2 third mechanism). */
18
15
  export declare function loadUserMap(path: string): Promise<LoadUserMapResult>;
19
16
  export type ResolvedCompositionSources = {
20
- useAgent: boolean;
21
17
  forceAgent: boolean;
22
18
  };
23
19
  export declare function resolveCompositionSources(opts: CompositionCliOptions): ResolvedCompositionSources;
@@ -3,22 +3,23 @@ import { type CompositionEdge, type InterchangeMap } from './interchange-schema.
3
3
  import { type EdgeConflict } from './merge-edges.js';
4
4
  export type ResolveMappingResult = {
5
5
  components: RawComponentDefinition[];
6
+ userMap?: InterchangeMap;
6
7
  edges: CompositionEdge[];
7
8
  conflicts: EdgeConflict[];
8
9
  warnings: string[];
9
10
  };
10
11
  /**
11
- * Orchestrate composition-map acquisition (spec T2) and enrichment (T7).
12
+ * Orchestrate composition-edge acquisition and enrichment.
12
13
  *
13
14
  * Sources by rank: user map (1) > typed-slot / "code slots" (2) > structural
14
15
  * usage evidence (3) > manifest (4) > doc (5) > adapter-resolved / extraEdges
15
- * (6) > agent (7). Manifest/doc edges are computed deterministically outside
16
+ * (6) > edge-emitting agent (7). Manifest/doc edges are computed deterministically outside
16
17
  * this function (see manifest-doc-evidence.ts) and joined via `extraEdges`.
17
18
  * ALL sources — including the code slots already on the incoming components —
18
19
  * are fed into one ranked merge and unioned; non-conflicting edges from every
19
20
  * source survive, and on a conflict (same parent+child, different slot) the
20
- * higher-rank source wins and the loser is recorded. The agent runs only when
21
- * `useAgent`/`forceAgent` is set AND there is residue a higher-rank source
21
+ * higher-rank source wins and the loser is recorded. The edge-emitting agent runs only when
22
+ * `forceAgent` is set OR there is residue a higher-rank source
22
23
  * didn't cover (routing/cost optimization) — `forceAgent` bypasses that
23
24
  * suppression but never changes rank.
24
25
  *
@@ -28,7 +29,6 @@ export type ResolveMappingResult = {
28
29
  export declare function resolveMapping(input: {
29
30
  components: RawComponentDefinition[];
30
31
  userMap?: InterchangeMap;
31
- useAgent?: boolean;
32
32
  forceAgent?: boolean;
33
33
  files: Array<{
34
34
  path: string;
@@ -53,10 +53,9 @@ export declare function resolveMapping(input: {
53
53
  */
54
54
  promptOverride?: string;
55
55
  /**
56
- * Pre-resolved edges from an external source (e.g. the agent-authored parser
56
+ * Pre-resolved edges from an external source (e.g. manifest or documentation)
57
57
  * path). They join the ranked merge at their own provenance rank alongside
58
- * code slots and the user map. Callers using this typically set
59
- * `useAgent: false` since they've already run their own resolution.
58
+ * code slots and the user map.
60
59
  */
61
60
  extraEdges?: CompositionEdge[];
62
61
  }): Promise<ResolveMappingResult>;
@@ -0,0 +1,3 @@
1
+ import type { Command } from 'commander';
2
+ export declare function collectSourceFiles(directory: string, onProgress?: (scannedCount: number) => void): Promise<string[]>;
3
+ export declare function registerInternalExtractCommand(program: Command): void;