@open-agent-toolkit/cli 0.0.18 → 0.0.20

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 (39) hide show
  1. package/assets/docs/cli-utilities/config-and-local-state.md +12 -0
  2. package/assets/docs/cli-utilities/configuration.md +16 -6
  3. package/assets/docs/cli-utilities/tool-packs.md +13 -0
  4. package/assets/docs/workflows/projects/lifecycle.md +2 -2
  5. package/assets/public-package-versions.json +4 -4
  6. package/assets/skills/oat-project-complete/SKILL.md +2 -2
  7. package/assets/skills/oat-project-document/SKILL.md +46 -29
  8. package/dist/commands/config/index.d.ts.map +1 -1
  9. package/dist/commands/config/index.js +108 -0
  10. package/dist/commands/init/tools/index.d.ts +1 -0
  11. package/dist/commands/init/tools/index.d.ts.map +1 -1
  12. package/dist/commands/init/tools/index.js +8 -1
  13. package/dist/commands/project/archive/archive-utils.d.ts +5 -0
  14. package/dist/commands/project/archive/archive-utils.d.ts.map +1 -1
  15. package/dist/commands/project/archive/archive-utils.js +10 -1
  16. package/dist/commands/project/archive/index.d.ts.map +1 -1
  17. package/dist/commands/project/archive/index.js +4 -1
  18. package/dist/commands/providers/inspect/inspect.d.ts.map +1 -1
  19. package/dist/commands/providers/inspect/inspect.js +4 -1
  20. package/dist/commands/providers/list/list.d.ts.map +1 -1
  21. package/dist/commands/providers/list/list.js +14 -2
  22. package/dist/commands/providers/providers.types.d.ts +3 -3
  23. package/dist/commands/providers/providers.types.d.ts.map +1 -1
  24. package/dist/commands/status/index.d.ts +2 -2
  25. package/dist/commands/status/index.d.ts.map +1 -1
  26. package/dist/commands/status/index.js +8 -3
  27. package/dist/commands/tools/remove/index.d.ts.map +1 -1
  28. package/dist/commands/tools/remove/index.js +25 -0
  29. package/dist/commands/tools/update/index.d.ts.map +1 -1
  30. package/dist/commands/tools/update/index.js +28 -2
  31. package/dist/config/oat-config.d.ts +2 -0
  32. package/dist/config/oat-config.d.ts.map +1 -1
  33. package/dist/config/oat-config.js +20 -0
  34. package/dist/drift/detector.d.ts +4 -1
  35. package/dist/drift/detector.d.ts.map +1 -1
  36. package/dist/drift/detector.js +14 -3
  37. package/dist/drift/index.d.ts +1 -0
  38. package/dist/drift/index.d.ts.map +1 -1
  39. package/package.json +1 -1
@@ -54,6 +54,18 @@ Archive lifecycle settings live here as shared repo config:
54
54
  - `archive.s3SyncOnComplete`
55
55
  - `archive.summaryExportPath`
56
56
 
57
+ Tool-pack installation state also lives here as shared repo config:
58
+
59
+ - `tools.core`
60
+ - `tools.docs`
61
+ - `tools.ideas`
62
+ - `tools.project-management`
63
+ - `tools.research`
64
+ - `tools.utility`
65
+ - `tools.workflows`
66
+
67
+ Use `oat config get tools.<pack>` when you need an explicit installed-capability signal for workflows or troubleshooting.
68
+
57
69
  When archive settings are configured, completion uploads dated archive snapshots to S3 and exports dated summary snapshots into the configured summary reference directory.
58
70
 
59
71
  Use these reference pages for file ownership and schema details:
@@ -18,12 +18,12 @@ For the deep file-by-file reference, see:
18
18
 
19
19
  ## The four config surfaces
20
20
 
21
- | Surface | File | Typical contents | Primary CLI surface |
22
- | -------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
23
- | Shared repo config | `.oat/config.json` | Repo-wide non-sync settings such as `projects.root`, `git.defaultBranch`, `documentation.*`, and `archive.*` | `oat config get/set/list/describe` |
24
- | Repo-local config | `.oat/config.local.json` | Per-developer state for this checkout, such as `activeProject`, `lastPausedProject`, and repo-local `activeIdea` | `oat config get/set/list/describe` |
25
- | User config | `~/.oat/config.json` | User-level state such as global `activeIdea` fallback | `oat config describe` |
26
- | Provider sync config | `.oat/sync/config.json` | Provider enablement and sync strategy settings | `oat providers set`, `oat config describe` |
21
+ | Surface | File | Typical contents | Primary CLI surface |
22
+ | -------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
23
+ | Shared repo config | `.oat/config.json` | Repo-wide non-sync settings such as `projects.root`, `git.defaultBranch`, `documentation.*`, `archive.*`, and `tools.*` | `oat config get/set/list/describe` |
24
+ | Repo-local config | `.oat/config.local.json` | Per-developer state for this checkout, such as `activeProject`, `lastPausedProject`, and repo-local `activeIdea` | `oat config get/set/list/describe` |
25
+ | User config | `~/.oat/config.json` | User-level state such as global `activeIdea` fallback | `oat config describe` |
26
+ | Provider sync config | `.oat/sync/config.json` | Provider enablement and sync strategy settings | `oat providers set`, `oat config describe` |
27
27
 
28
28
  The main split is:
29
29
 
@@ -64,6 +64,16 @@ Common keys in `.oat/config.json`:
64
64
  - `archive.s3Uri` — base S3 archive prefix
65
65
  - `archive.s3SyncOnComplete` — upload archived projects to S3 during completion
66
66
  - `archive.summaryExportPath` — export `summary.md` into a durable tracked directory during completion
67
+ - `tools.<pack>` — whether a bundled tool pack is currently installed in the repo or user scopes after lifecycle reconciliation
68
+
69
+ Tool-pack state example:
70
+
71
+ ```bash
72
+ oat config get tools.project-management
73
+ oat config set tools.project-management true
74
+ ```
75
+
76
+ The `tools.*` keys are primarily maintained by `oat tools install`, `oat tools update`, and `oat tools remove`, but they are intentionally visible through `oat config` so workflows and operators can inspect or override pack-state signals when needed.
67
77
 
68
78
  Archive example:
69
79
 
@@ -74,6 +74,7 @@ Key behavior:
74
74
  - Same pack selection and install flow as `oat init tools`
75
75
  - Pack-oriented install subcommands: `core`, `docs`, `ideas`, `workflows`, `utility`, `project-management`, `research`
76
76
  - Tracks installed vs bundled skill versions and reports outdated skills
77
+ - Records installed pack state in shared repo config as `tools.<pack>: true` so other OAT workflows can detect installed capabilities without relying on filesystem heuristics
77
78
  - Interactive runs can prompt to update selected outdated skills
78
79
  - Auto-sync runs automatically after successful install (provider views are updated)
79
80
  - Use `--no-sync` to skip auto-sync
@@ -89,6 +90,7 @@ Key behavior:
89
90
  - Accepts a tool name, `--pack <pack>`, or `--all` (mutually exclusive)
90
91
  - Compares installed versions against bundled versions and copies updated assets
91
92
  - For `--pack <pack>` and `--all`, an already-installed pack is reconciled to include newly added bundled skills or agents in that same scope
93
+ - For `--pack <pack>` and `--all`, shared repo config is also reconciled from an installed-pack scan so `tools.*` reflects what is actually available and stale `true` flags are cleared
92
94
  - Dry-run mode with `--dry-run`; auto-sync after mutations by default
93
95
  - Use `--no-sync` to skip auto-sync
94
96
  - Reports tools that are already current, newer than bundled, or not bundled (custom)
@@ -103,9 +105,20 @@ Key behavior:
103
105
 
104
106
  - Accepts a tool name, `--pack <pack>`, or `--all` (mutually exclusive)
105
107
  - Removes skill directories and agent `.md` files from canonical locations
108
+ - For `--pack <pack>` and `--all`, shared repo config is rewritten from a post-removal scan so `tools.<pack>` becomes `false` when a pack is no longer installed in any scope
106
109
  - Dry-run mode with `--dry-run`; auto-sync after mutations by default
107
110
  - Use `--no-sync` to skip auto-sync
108
111
 
112
+ ## Shared config signal: `tools.*`
113
+
114
+ Tool-pack lifecycle commands now persist pack availability in shared repo config under `.oat/config.json`.
115
+
116
+ - `oat tools install <pack>` writes `tools.<pack>: true`
117
+ - `oat tools update --pack <pack>` and `oat tools update --all` rebuild the full `tools` map from installed-pack scans
118
+ - `oat tools remove --pack <pack>` and `oat tools remove --all` rebuild the same map after removals
119
+
120
+ This matters because other workflows can now check `oat config get tools.<pack>` instead of inferring capabilities from directory existence alone. For example, `oat-project-document` checks `tools.project-management` before auto-running repo-reference refresh work.
121
+
109
122
  ## Core pack
110
123
 
111
124
  The `core` pack contains foundational diagnostic and documentation skills:
@@ -18,7 +18,7 @@ OAT lifecycle order:
18
18
  7. Summary (`oat-project-summary`) — generates `summary.md` as institutional memory; `oat-project-pr-final` and `oat-project-complete` auto-refresh it when missing or stale
19
19
  8. PR (`oat-project-pr-progress` / `oat-project-pr-final`) — sets `pr_open` status
20
20
  9. Revision loop (`oat-project-revise`) — optional; accepts post-PR feedback
21
- 10. Documentation sync (`oat-project-document`) — optional; reads project artifacts to identify docs needing updates
21
+ 10. Documentation sync (`oat-project-document`) — optional; reads project artifacts to identify docs needing updates, checks `tools.project-management`, and auto-runs `oat-pjm-update-repo-reference` before scanning docs when the project-management pack is installed
22
22
  11. Complete (`oat-project-complete`)
23
23
 
24
24
  **Shortcut:** `oat-project-next` reads project state and invokes the correct next skill automatically — use it instead of remembering which skill comes next. Complements `oat-project-progress` (which is read-only diagnostic).
@@ -49,7 +49,7 @@ flowchart LR
49
49
  After implementation and final review pass:
50
50
 
51
51
  1. **Summary** (`oat-project-summary`) — generates `summary.md` as institutional memory from project artifacts; PR-final and completion will auto-refresh it if you have not already run it or if it is stale
52
- 2. **Documentation** (`oat-project-document`) — optional sync of project docs
52
+ 2. **Documentation** (`oat-project-document`) — optional sync of project docs; now uses the shared `tools.project-management` config signal to decide whether repo-reference refresh should run before docs analysis
53
53
  3. **PR** (`oat-project-pr-final`) — creates PR description (auto-refreshes `summary.md` first when needed, then uses it as source), sets `oat_phase_status: pr_open`, and tracks actual PR existence with `oat_pr_status` / `oat_pr_url`
54
54
  4. **Revision loop** (`oat-project-revise`) — accepts post-PR feedback:
55
55
  - Inline feedback creates `p-revN` revision phases with `prevN-tNN` task IDs
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.0.18",
3
- "docs-config": "0.0.18",
4
- "docs-theme": "0.0.18",
5
- "docs-transforms": "0.0.18"
2
+ "cli": "0.0.20",
3
+ "docs-config": "0.0.20",
4
+ "docs-theme": "0.0.20",
5
+ "docs-transforms": "0.0.20"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-complete
3
- version: 1.3.5
3
+ version: 1.3.6
4
4
  description: Use when all implementation work is finished and the project is ready to close. Marks the OAT project lifecycle as complete.
5
5
  disable-model-invocation: true
6
6
  user-invocable: true
@@ -343,7 +343,7 @@ echo "Project archived to $ARCHIVE_PATH"
343
343
 
344
344
  - Always archive locally first. The local archive is the authoritative completion artifact even when remote sync is also configured.
345
345
  - If `archive.summaryExportPath` is configured and `summary.md` exists after archive, copy it to `{repoRoot}/{archive.summaryExportPath}/YYYYMMDD-{PROJECT_NAME}.md`.
346
- - If `archive.s3SyncOnComplete=true` and `archive.s3Uri` is configured, sync the archived project to `{archive.s3Uri}/{repo-slug}/{PROJECT_NAME}/`.
346
+ - If `archive.s3SyncOnComplete=true` and `archive.s3Uri` is configured, sync the archived project to `{archive.s3Uri}/{repo-slug}/{PROJECT_NAME}/`. The S3 sync excludes process artifacts (`reviews/*`, `pr/*`) — only core deliverables (discovery, spec, design, plan, implementation, summary, state) are uploaded. The CLI enforces this via `S3_ARCHIVE_SYNC_EXCLUDES` in `archive-utils.ts`.
347
347
  - If AWS CLI is missing or unusable for that S3 sync, warn and continue. Completion must not fail after the local archive succeeds.
348
348
  - If `archive.s3SyncOnComplete` is false or `archive.s3Uri` is unset, skip remote sync without prompting.
349
349
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: oat-project-document
3
- version: 1.0.1
3
+ version: 1.2.0
4
4
  description: Run when implementation is complete and documentation needs updating. Analyzes project artifacts to produce documentation update recommendations, then applies approved changes before project completion.
5
5
  argument-hint: '[project-path] [--auto]'
6
6
  disable-model-invocation: true
7
7
  user-invocable: true
8
- allowed-tools: Read, Write, Edit, Bash(git:*), Glob, Grep, AskUserQuestion
8
+ allowed-tools: Read, Write, Edit, Bash(git:*), Glob, Grep, AskUserQuestion, Skill
9
9
  ---
10
10
 
11
11
  # Project Documentation Sync
@@ -140,7 +140,24 @@ Glob: **/docusaurus.config.{js,ts}
140
140
 
141
141
  Store resolved values for use in later steps. Do not write auto-detected values to config.
142
142
 
143
- ### Step 1: Read Project Artifacts
143
+ ### Step 1: Check for PJM Infrastructure
144
+
145
+ Check whether the project-management tool pack is installed by reading config:
146
+
147
+ ```bash
148
+ PJM_INSTALLED=$(oat config get tools.project-management 2>/dev/null || echo "false")
149
+ ```
150
+
151
+ **If `PJM_INSTALLED` is `true`:**
152
+
153
+ - Invoke `oat-pjm-update-repo-reference` automatically before proceeding.
154
+ - Do not ask whether to run the repo reference update during project-document.
155
+ - **If invocation succeeds:** Log that repo reference docs were refreshed and continue to Step 2. The reference surfaces will already be current when the documentation scan reads them in Step 4a.4.
156
+ - **If invocation fails:** Warn the user that the repo reference update failed, but continue with the documentation sync — a PJM failure should not block documentation updates.
157
+
158
+ **If `PJM_INSTALLED` is not `true`:** Skip silently and proceed to Step 2.
159
+
160
+ ### Step 2: Read Project Artifacts
144
161
 
145
162
  Read all available project artifacts to build an understanding of what was built.
146
163
 
@@ -171,14 +188,14 @@ While reading artifacts, collect all source file paths mentioned in:
171
188
  - Implementation.md `**Files changed:**` entries
172
189
  - Design component interfaces and data models
173
190
 
174
- These will be verified against actual code in Step 2.
191
+ These will be verified against actual code in Step 3.
175
192
 
176
193
  **Handle missing artifacts gracefully:**
177
194
 
178
195
  - Quick-mode projects may lack spec.md and design.md — extract what's available
179
196
  - If only plan.md exists (no implementation.md), the project may not have started implementation yet — still proceed, but note that documentation recommendations will be based on planned work rather than verified implementation
180
197
 
181
- ### Step 2: Verify Against Code
198
+ ### Step 3: Verify Against Code
182
199
 
183
200
  Read source files referenced in artifacts to confirm what actually shipped.
184
201
 
@@ -201,11 +218,11 @@ Read source files referenced in artifacts to confirm what actually shipped.
201
218
  - If artifacts reference many files (>20), prioritize: new files first, then modified files with the most changes
202
219
  - Read file contents, not just check existence — the skill needs to understand what the code does to make good documentation recommendations
203
220
 
204
- ### Step 3: Discover Documentation Surfaces
221
+ ### Step 4: Discover Documentation Surfaces
205
222
 
206
223
  Scan the repository for all documentation and instruction surfaces.
207
224
 
208
- **3a. Documentation surfaces (primary — thorough analysis):**
225
+ **4a. Documentation surfaces (primary — thorough analysis):**
209
226
 
210
227
  1. **Docs directory** (if `$DOCS_ROOT` is set):
211
228
  - Read the docs tooling config (e.g., `$DOCS_CONFIG`) to understand nav structure
@@ -224,7 +241,7 @@ Scan the repository for all documentation and instruction surfaces.
224
241
  - Check `.oat/repo/reference/` directory
225
242
  - Read: `current-state.md`, `backlog/index.md`, `backlog/completed.md`, `roadmap.md`, `decision-record.md`, and relevant `backlog/items/*.md` files as needed (whichever exist)
226
243
 
227
- **3b. Instruction surfaces (secondary — strong signals only):**
244
+ **4b. Instruction surfaces (secondary — strong signals only):**
228
245
 
229
246
  1. **Root AGENTS.md / CLAUDE.md:**
230
247
  - Always check — read current content
@@ -242,18 +259,18 @@ Scan the repository for all documentation and instruction surfaces.
242
259
  - Gemini: `.gemini/rules/`
243
260
  - Read existing rules files that may need updating
244
261
 
245
- **Store surface inventory** for use in Step 4. For each surface, record:
262
+ **Store surface inventory** for use in Step 5. For each surface, record:
246
263
 
247
264
  - File path (existing or potential)
248
265
  - Surface type (docs | readme | reference | agents | provider-rules)
249
266
  - Current content summary (for existing files)
250
267
  - Whether it's in a directory affected by the project
251
268
 
252
- ### Step 4: Assess Documentation Delta
269
+ ### Step 5: Assess Documentation Delta
253
270
 
254
- Compare "what was built" (from Steps 1-2) against "what's documented" (from Step 3) to produce recommendations.
271
+ Compare "what was built" (from Steps 2-3) against "what's documented" (from Step 4) to produce recommendations.
255
272
 
256
- **4a. Documentation surface assessment:**
273
+ **5a. Documentation surface assessment:**
257
274
 
258
275
  For each documentation surface relevant to the project, determine one of:
259
276
 
@@ -274,7 +291,7 @@ For each documentation surface relevant to the project, determine one of:
274
291
 
275
292
  - **No change:** Surface is already accurate — skip from delta plan.
276
293
 
277
- **4b. Instruction surface assessment (strong signals only):**
294
+ **5b. Instruction surface assessment (strong signals only):**
278
295
 
279
296
  Only recommend instruction changes when there is a clear trigger:
280
297
 
@@ -288,7 +305,7 @@ Only recommend instruction changes when there is a clear trigger:
288
305
 
289
306
  If no strong signal is present for an instruction surface, skip it.
290
307
 
291
- **4c. Per recommendation, capture:**
308
+ **5c. Per recommendation, capture:**
292
309
 
293
310
  ```
294
311
  - Target: {file path — existing or proposed}
@@ -298,11 +315,11 @@ If no strong signal is present for an instruction surface, skip it.
298
315
  - Content guidance: {specific content to add or outline for new files}
299
316
  ```
300
317
 
301
- ### Step 5: Present Delta Plan
318
+ ### Step 6: Present Delta Plan
302
319
 
303
320
  Format and present the recommendations for user approval.
304
321
 
305
- **5a. Format output:**
322
+ **6a. Format output:**
306
323
 
307
324
  ```
308
325
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -326,13 +343,13 @@ Format and present the recommendations for user approval.
326
343
  Evidence: {reference}
327
344
  ```
328
345
 
329
- **5b. Handle edge cases:**
346
+ **6b. Handle edge cases:**
330
347
 
331
- - If `$AUTO_MODE` is true: skip to Step 6 (apply all recommendations)
348
+ - If `$AUTO_MODE` is true: skip to Step 7 (apply all recommendations)
332
349
  - If no recommendations found: report "No documentation updates identified for this project.", set `oat_docs_updated: complete` in state.md, and exit
333
350
  - If only instruction recommendations (no docs): still present, but note the documentation-first priority
334
351
 
335
- **5c. Interactive approval:**
352
+ **6c. Interactive approval:**
336
353
 
337
354
  ```
338
355
  Approve recommendations?
@@ -345,9 +362,9 @@ Approve recommendations?
345
362
  - **Individual:** present each recommendation one at a time with approve/reject
346
363
  - **Skip:** set `oat_docs_updated: skipped` and `oat_project_state_updated: "{ISO 8601 UTC timestamp}"` in `$PROJECT_PATH/state.md` frontmatter, commit the state change, and exit without applying documentation changes
347
364
 
348
- Track which recommendations were approved for Step 6.
365
+ Track which recommendations were approved for Step 7.
349
366
 
350
- ### Step 6: Apply Approved Changes
367
+ ### Step 7: Apply Approved Changes
351
368
 
352
369
  Execute the approved documentation updates.
353
370
 
@@ -382,36 +399,36 @@ If `$DOCS_CONFIG` exists and new files were created in the docs directory:
382
399
  - Track a `$ALL_SUCCEEDED` flag (default: true). If any file write fails, set `$ALL_SUCCEEDED` to false, log the error, and continue with remaining recommendations
383
400
  - At the end, report any failures with the specific files that could not be written
384
401
 
385
- ### Step 7: Commit and Update State
402
+ ### Step 8: Commit and Update State
386
403
 
387
- **7a. Stage and commit documentation changes:**
404
+ **8a. Stage and commit documentation changes:**
388
405
 
389
406
  ```bash
390
407
  git add {list of changed/created documentation files}
391
408
  git diff --cached --quiet || git commit -m "docs({project-name}): update documentation from project artifacts"
392
409
  ```
393
410
 
394
- Only stage files that were actually changed or created in Step 6. Do not use `git add -A`.
411
+ Only stage files that were actually changed or created in Step 7. Do not use `git add -A`.
395
412
 
396
- **7b. Update project state:**
413
+ **8b. Update project state:**
397
414
 
398
415
  Update `$PROJECT_PATH/state.md` frontmatter based on apply outcome:
399
416
 
400
417
  - If `$ALL_SUCCEEDED` is true: set `oat_docs_updated: complete` and `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`
401
- - If `$ALL_SUCCEEDED` is false: do **not** set `oat_docs_updated: complete` — leave the field as `null` so the skill can be re-run. Still set `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`. Surface the failures clearly in the summary report (Step 7d) so the user knows which updates failed and why.
418
+ - If `$ALL_SUCCEEDED` is false: do **not** set `oat_docs_updated: complete` — leave the field as `null` so the skill can be re-run. Still set `oat_project_state_updated: "{ISO 8601 UTC timestamp}"`. Surface the failures clearly in the summary report (Step 8d) so the user knows which updates failed and why.
402
419
 
403
420
  ```bash
404
421
  git add "$PROJECT_PATH/state.md"
405
422
  git diff --cached --quiet || git commit -m "chore({project-name}): mark docs updated"
406
423
  ```
407
424
 
408
- **7c. Handle edge cases:**
425
+ **8c. Handle edge cases:**
409
426
 
410
- - If user explicitly skipped (chose [S]kip in Step 5): `oat_docs_updated` was already set to `skipped` in Step 5. No further state update needed here.
427
+ - If user explicitly skipped (chose [S]kip in Step 6): `oat_docs_updated` was already set to `skipped` in Step 6. No further state update needed here.
411
428
  - If no recommendations were found: set `oat_docs_updated: complete` (nothing to do is still "done").
412
429
  - If `--auto` mode: apply all, commit, set state — no user interaction.
413
430
 
414
- **7d. Report summary:**
431
+ **8d. Report summary:**
415
432
 
416
433
  If `$ALL_SUCCEEDED` is true:
417
434
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAA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C;AA2CpC,UAAU,yBAAyB;IACjC,mBAAmB,EAAE,CACnB,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAC/C,cAAc,CAAC;IACpB,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvE,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,KACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAk3BD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CAiET"}
@@ -18,6 +18,13 @@ const KEY_ORDER = [
18
18
  'documentation.requireForProjectCompletion',
19
19
  'git.defaultBranch',
20
20
  'projects.root',
21
+ 'tools.core',
22
+ 'tools.docs',
23
+ 'tools.ideas',
24
+ 'tools.project-management',
25
+ 'tools.research',
26
+ 'tools.utility',
27
+ 'tools.workflows',
21
28
  'worktrees.root',
22
29
  ];
23
30
  const CONFIG_CATALOG = [
@@ -142,6 +149,83 @@ const CONFIG_CATALOG = [
142
149
  owningCommand: 'oat config set archive.summaryExportPath <value>',
143
150
  description: 'Repository-relative directory where completion copies project summaries for durable tracked reference.',
144
151
  },
152
+ {
153
+ key: 'tools.core',
154
+ group: 'Shared Repo (.oat/config.json)',
155
+ file: '.oat/config.json',
156
+ scope: 'shared repo',
157
+ type: 'boolean',
158
+ defaultValue: 'false',
159
+ mutability: 'read/write',
160
+ owningCommand: 'oat tools install / oat tools update',
161
+ description: 'Whether the core tool pack is installed.',
162
+ },
163
+ {
164
+ key: 'tools.docs',
165
+ group: 'Shared Repo (.oat/config.json)',
166
+ file: '.oat/config.json',
167
+ scope: 'shared repo',
168
+ type: 'boolean',
169
+ defaultValue: 'false',
170
+ mutability: 'read/write',
171
+ owningCommand: 'oat tools install / oat tools update',
172
+ description: 'Whether the docs tool pack is installed.',
173
+ },
174
+ {
175
+ key: 'tools.ideas',
176
+ group: 'Shared Repo (.oat/config.json)',
177
+ file: '.oat/config.json',
178
+ scope: 'shared repo',
179
+ type: 'boolean',
180
+ defaultValue: 'false',
181
+ mutability: 'read/write',
182
+ owningCommand: 'oat tools install / oat tools update',
183
+ description: 'Whether the ideas tool pack is installed.',
184
+ },
185
+ {
186
+ key: 'tools.project-management',
187
+ group: 'Shared Repo (.oat/config.json)',
188
+ file: '.oat/config.json',
189
+ scope: 'shared repo',
190
+ type: 'boolean',
191
+ defaultValue: 'false',
192
+ mutability: 'read/write',
193
+ owningCommand: 'oat tools install / oat tools update',
194
+ description: 'Whether the project-management tool pack is installed.',
195
+ },
196
+ {
197
+ key: 'tools.research',
198
+ group: 'Shared Repo (.oat/config.json)',
199
+ file: '.oat/config.json',
200
+ scope: 'shared repo',
201
+ type: 'boolean',
202
+ defaultValue: 'false',
203
+ mutability: 'read/write',
204
+ owningCommand: 'oat tools install / oat tools update',
205
+ description: 'Whether the research tool pack is installed.',
206
+ },
207
+ {
208
+ key: 'tools.utility',
209
+ group: 'Shared Repo (.oat/config.json)',
210
+ file: '.oat/config.json',
211
+ scope: 'shared repo',
212
+ type: 'boolean',
213
+ defaultValue: 'false',
214
+ mutability: 'read/write',
215
+ owningCommand: 'oat tools install / oat tools update',
216
+ description: 'Whether the utility tool pack is installed.',
217
+ },
218
+ {
219
+ key: 'tools.workflows',
220
+ group: 'Shared Repo (.oat/config.json)',
221
+ file: '.oat/config.json',
222
+ scope: 'shared repo',
223
+ type: 'boolean',
224
+ defaultValue: 'false',
225
+ mutability: 'read/write',
226
+ owningCommand: 'oat tools install / oat tools update',
227
+ description: 'Whether the workflows tool pack is installed.',
228
+ },
145
229
  {
146
230
  key: 'activeProject',
147
231
  group: 'Repo Local (.oat/config.local.json)',
@@ -316,6 +400,16 @@ async function getConfigValue(repoRoot, key, dependencies) {
316
400
  source: archive ? 'config.json' : 'default',
317
401
  };
318
402
  }
403
+ if (key.startsWith('tools.')) {
404
+ const config = await dependencies.readOatConfig(repoRoot);
405
+ const packName = key.slice('tools.'.length);
406
+ const tools = config.tools ?? {};
407
+ return {
408
+ key,
409
+ value: String(tools[packName] ?? false),
410
+ source: config.tools ? 'config.json' : 'default',
411
+ };
412
+ }
319
413
  if (key === 'git.defaultBranch') {
320
414
  const config = await dependencies.readOatConfig(repoRoot);
321
415
  return {
@@ -437,6 +531,20 @@ async function setConfigValue(repoRoot, key, rawValue, dependencies) {
437
531
  source: 'config.json',
438
532
  };
439
533
  }
534
+ if (key.startsWith('tools.')) {
535
+ const packName = key.slice('tools.'.length);
536
+ const tools = { ...config.tools };
537
+ tools[packName] = rawValue.trim().toLowerCase() === 'true';
538
+ await dependencies.writeOatConfig(repoRoot, {
539
+ ...config,
540
+ tools,
541
+ });
542
+ return {
543
+ key,
544
+ value: String(tools[packName] ?? false),
545
+ source: 'config.json',
546
+ };
547
+ }
440
548
  if (key === 'git.defaultBranch') {
441
549
  const nextValue = rawValue.trim();
442
550
  if (!nextValue) {
@@ -35,6 +35,7 @@ interface InitToolsDependencies {
35
35
  action: string;
36
36
  }>;
37
37
  readOatConfig: (repoRoot: string) => Promise<OatConfig>;
38
+ writeOatConfig: (repoRoot: string, config: OatConfig) => Promise<void>;
38
39
  resolveLocalPaths: (config: OatConfig) => string[];
39
40
  upsertAgentsMdSection: (repoRoot: string, key: string, body: string) => Promise<UpsertSectionResult>;
40
41
  removeAgentsMdSection: (repoRoot: string, key: string) => Promise<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/init/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EAGlB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAEL,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACpC,MAAM,iDAAiD,CAAC;AAEzD,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAE3B,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAE1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AAEvC,KAAK,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC;AACvC,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,OAAO,GACP,MAAM,GACN,WAAW,GACX,SAAS,GACT,o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BAAyB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,MAAM,CAuCxE;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,qBAAqB,GAClC,OAAO,CAAC,QAAQ,EAAE,CAAC,CA6PrB;AAED,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAErB;AAED,wBAAgB,sBAAsB,CACpC,SAAS,GAAE,OAAO,CAAC,qBAAqB,CAAM,GAC7C,OAAO,CAuBT"}
@@ -6,7 +6,7 @@ import { addLocalPaths } from '../../local/manage.js';
6
6
  import { removeAgentsMdSection, upsertAgentsMdSection, } from '../../shared/agents-md.js';
7
7
  import { selectManyWithAbort, selectWithAbort, } from '../../shared/shared.prompts.js';
8
8
  import { readGlobalOptions } from '../../shared/shared.utils.js';
9
- import { readOatConfig, resolveLocalPaths, } from '../../../config/oat-config.js';
9
+ import { readOatConfig, resolveLocalPaths, writeOatConfig, } from '../../../config/oat-config.js';
10
10
  import { resolveAssetsRoot } from '../../../fs/assets.js';
11
11
  import { resolveProjectRoot, resolveScopeRoot } from '../../../fs/paths.js';
12
12
  import { Command } from 'commander';
@@ -58,6 +58,7 @@ const DEFAULT_DEPENDENCIES = {
58
58
  addLocalPaths,
59
59
  applyGitignore,
60
60
  readOatConfig,
61
+ writeOatConfig,
61
62
  resolveLocalPaths,
62
63
  upsertAgentsMdSection,
63
64
  removeAgentsMdSection,
@@ -346,6 +347,12 @@ export async function runInitTools(context, dependencies) {
346
347
  if (!context.json && sectionResult.action !== 'no-change') {
347
348
  context.logger.info(`AGENTS.md tool packs section ${sectionResult.action}.`);
348
349
  }
350
+ const config = await dependencies.readOatConfig(projectRoot);
351
+ const tools = { ...config.tools };
352
+ for (const pack of selectedPacks) {
353
+ tools[pack] = true;
354
+ }
355
+ await dependencies.writeOatConfig(projectRoot, { ...config, tools });
349
356
  const hasUserScope = selectedPacks.some((pack) => packScopes[pack] === 'user');
350
357
  reportSuccess(context, selectedPacks, hasUserScope ? 'user' : 'project');
351
358
  process.exitCode = 0;
@@ -51,6 +51,11 @@ export interface ArchiveProjectOnCompletionResult {
51
51
  warnings: string[];
52
52
  }
53
53
  export declare const ARCHIVE_SNAPSHOT_METADATA_FILENAME = ".oat-archive-source.json";
54
+ /**
55
+ * Directories excluded from S3 archive sync. These contain process artifacts
56
+ * (reviews, PR descriptions) rather than project deliverables.
57
+ */
58
+ export declare const S3_ARCHIVE_SYNC_EXCLUDES: string[];
54
59
  export interface ArchiveSnapshotMetadata {
55
60
  projectName: string;
56
61
  snapshotName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"archive-utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/archive-utils.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,aAAa,EACb,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,QAAQ,CAAC;AAIhB,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,KAChD,OAAO,CAAC,cAAc,CAAC,CAAC;AAE7B,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,YAAY,GAAG,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,UAAU,iCAAiC;IACzC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,O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,CAAC;CACtB;AA8BD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM,CAER;AAmBD,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,MAAM,CAER;AAED,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CA4BA;AAED,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,GAClB,MAAM,CAIR;AAqJD,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,iCAAiC,EAC1C,YAAY,GAAE,sCAA2C,GACxD,OAAO,CAAC,gCAAgC,CAAC,CAoG3C;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,4BAA4B,EACrC,YAAY,GAAE,iCAAsC,GACnD,OAAO,CAAC,2BAA2B,CAAC,CA0CtC"}
1
+ {"version":3,"file":"archive-utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/archive-utils.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,aAAa,EACb,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,QAAQ,CAAC;AAIhB,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC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AA2B,CAAC,CA0CtC"}
@@ -6,6 +6,11 @@ import { CliError } from '../../../errors/cli-error.js';
6
6
  import { copyDirectory, copySingleFile, dirExists, ensureDir, fileExists, } from '../../../fs/io.js';
7
7
  const execFileAsync = promisify(execFileCallback);
8
8
  export const ARCHIVE_SNAPSHOT_METADATA_FILENAME = '.oat-archive-source.json';
9
+ /**
10
+ * Directories excluded from S3 archive sync. These contain process artifacts
11
+ * (reviews, PR descriptions) rather than project deliverables.
12
+ */
13
+ export const S3_ARCHIVE_SYNC_EXCLUDES = ['reviews/*', 'pr/*'];
9
14
  function normalizeS3Uri(s3Uri) {
10
15
  return s3Uri.trim().replace(/\/+$/, '');
11
16
  }
@@ -215,7 +220,11 @@ export async function archiveProjectOnCompletion(options, dependencies = {}) {
215
220
  if (access.ok) {
216
221
  s3Path = buildProjectArchiveS3Uri(options.s3Uri, options.repoRoot, snapshotName);
217
222
  try {
218
- await execFile('aws', ['s3', 'sync', archivePath, s3Path], {
223
+ const syncArgs = ['s3', 'sync', archivePath, s3Path];
224
+ for (const pattern of S3_ARCHIVE_SYNC_EXCLUDES) {
225
+ syncArgs.push('--exclude', pattern);
226
+ }
227
+ await execFile('aws', syncArgs, {
219
228
  cwd: options.repoRoot,
220
229
  env: dependencies.env ?? process.env,
221
230
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAIhD,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGhF,OAAO,EAAE,KAAK,SAAS,EAAiB,MAAM,oBAAoB,CAAC;AAGnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAEL,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,YAAY,EAEjB,8BAA8B,EAC/B,MAAM,iBAAi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WAAW,iCAAiC;IAChD,mBAAmB,EAAE,CACnB,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAC/C,cAAc,CAAC;IACpB,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,qBAAqB,EAAE,OAAO,qBAAqB,CAAC;IACpD,qBAAqB,EAAE,OAAO,qBAAqB,CAAC;IACpD,wBAAwB,EAAE,OAAO,wBAAwB,CAAC;IAC1D,8BAA8B,EAAE,OAAO,8BAA8B,CAAC;IACtE,QAAQ,EAAE,YAAY,CAAC;IACvB,eAAe,EAAE,OAAO,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAwLD,wBAAgB,2BAA2B,CACzC,SAAS,GAAE,OAAO,CAAC,iCAAiC,CAAM,GACzD,OAAO,CAuKT"}
@@ -9,7 +9,7 @@ import { readOatConfig } from '../../../config/oat-config.js';
9
9
  import { CliError } from '../../../errors/cli-error.js';
10
10
  import { resolveProjectRoot } from '../../../fs/paths.js';
11
11
  import { Command } from 'commander';
12
- import { ARCHIVE_SNAPSHOT_METADATA_FILENAME, buildProjectArchiveS3Uri, buildRepoArchiveS3Uri, ensureS3ArchiveAccess, parseArchiveSnapshotName, resolveLocalArchiveProjectPath, } from './archive-utils.js';
12
+ import { ARCHIVE_SNAPSHOT_METADATA_FILENAME, S3_ARCHIVE_SYNC_EXCLUDES, buildProjectArchiveS3Uri, buildRepoArchiveS3Uri, ensureS3ArchiveAccess, parseArchiveSnapshotName, resolveLocalArchiveProjectPath, } from './archive-utils.js';
13
13
  const execFileAsync = promisify(execFileCallback);
14
14
  function defaultDependencies() {
15
15
  return {
@@ -31,6 +31,9 @@ function resolveLocalArchiveRoot(projectsRoot) {
31
31
  }
32
32
  function buildArchiveSyncArgs(source, target, options) {
33
33
  const args = ['s3', 'sync', source, target];
34
+ for (const pattern of S3_ARCHIVE_SYNC_EXCLUDES) {
35
+ args.push('--exclude', pattern);
36
+ }
34
37
  if (options.dryRun) {
35
38
  args.push('--dryrun');
36
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/inspect/inspect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,4BAA4B,EAC7B,MAAM,qCAAqC,CAAC;AAmB7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+KpC,wBAAgB,6BAA6B,CAC3C,SAAS,GAAE,OAAO,CAAC,4BAA4B,CAAM,GACpD,OAAO,CAiBT"}
1
+ {"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/inspect/inspect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,4BAA4B,EAC7B,MAAM,qCAAqC,CAAC;AAmB7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuLpC,wBAAgB,6BAA6B,CAC3C,SAAS,GAAE,OAAO,CAAC,4BAA4B,CAAM,GACpD,OAAO,CAiBT"}
@@ -71,6 +71,9 @@ async function collectInspectResult(providerName, context, dependencies) {
71
71
  drifted: 0,
72
72
  missing: 0,
73
73
  };
74
+ const copyTransform = mapping.transformCanonical
75
+ ? { transformCanonical: mapping.transformCanonical }
76
+ : undefined;
74
77
  for (const entry of manifest.entries) {
75
78
  if (entry.provider !== adapter.name) {
76
79
  continue;
@@ -79,7 +82,7 @@ async function collectInspectResult(providerName, context, dependencies) {
79
82
  continue;
80
83
  }
81
84
  state.managed += 1;
82
- const report = await dependencies.detectDrift(entry, scopeRoot.root);
85
+ const report = await dependencies.detectDrift(entry, scopeRoot.root, copyTransform);
83
86
  if (report.state.status === 'in_sync') {
84
87
  state.inSync += 1;
85
88
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/list/list.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,yBAAyB,EAC1B,MAAM,qCAAqC,CAAC;AAe7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsLpC,wBAAgB,0BAA0B,CACxC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CAcT"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/list/list.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,yBAAyB,EAC1B,MAAM,qCAAqC,CAAC;AAmB7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwMpC,wBAAgB,0BAA0B,CACxC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CAcT"}
@@ -2,7 +2,7 @@ import { join } from 'node:path';
2
2
  import { buildCommandContext } from '../../../app/command-context.js';
3
3
  import { readGlobalOptions, resolveConcreteScopes, } from '../../shared/shared.utils.js';
4
4
  import { detectDrift } from '../../../drift/index.js';
5
- import { resolveProjectRoot, resolveScopeRoot } from '../../../fs/paths.js';
5
+ import { normalizeToPosixPath, resolveProjectRoot, resolveScopeRoot, } from '../../../fs/paths.js';
6
6
  import { loadManifest } from '../../../manifest/index.js';
7
7
  import { claudeAdapter } from '../../../providers/claude/index.js';
8
8
  import { codexAdapter } from '../../../providers/codex/index.js';
@@ -95,9 +95,11 @@ async function collectProviderList(context, dependencies) {
95
95
  for (const adapter of dependencies.getAdapters()) {
96
96
  const summary = createEmptySummary();
97
97
  const contentTypes = new Set();
98
+ const allMappings = [];
98
99
  for (const scope of scopes) {
99
100
  for (const mapping of dependencies.getSyncMappings(adapter, scope)) {
100
101
  contentTypes.add(mapping.contentType);
102
+ allMappings.push(mapping);
101
103
  }
102
104
  }
103
105
  let detected = false;
@@ -114,7 +116,17 @@ async function collectProviderList(context, dependencies) {
114
116
  continue;
115
117
  }
116
118
  summary.managed += 1;
117
- const report = await dependencies.detectDrift(entry, scopeRoot.root);
119
+ const matchedMapping = allMappings.find((mapping) => {
120
+ const normalizedEntry = normalizeToPosixPath(entry.providerPath);
121
+ const normalizedDir = normalizeToPosixPath(mapping.providerDir);
122
+ return (mapping.contentType === entry.contentType &&
123
+ (normalizedEntry === normalizedDir ||
124
+ normalizedEntry.startsWith(`${normalizedDir}/`)));
125
+ });
126
+ const copyTransform = matchedMapping?.transformCanonical
127
+ ? { transformCanonical: matchedMapping.transformCanonical }
128
+ : undefined;
129
+ const report = await dependencies.detectDrift(entry, scopeRoot.root, copyTransform);
118
130
  if (report.state.status === 'in_sync') {
119
131
  summary.inSync += 1;
120
132
  continue;
@@ -1,6 +1,6 @@
1
1
  import type { CommandContext, GlobalOptions } from '../../app/command-context.js';
2
2
  import type { SyncConfig } from '../../config/index.js';
3
- import type { DriftReport } from '../../drift/index.js';
3
+ import type { CopyTransform, DriftReport } from '../../drift/index.js';
4
4
  import type { Manifest } from '../../manifest/index.js';
5
5
  import type { PathMapping, ProviderAdapter } from '../../providers/shared/index.js';
6
6
  import type { ConcreteScope, ContentType, Scope, SyncStrategy } from '../../shared/types.js';
@@ -24,7 +24,7 @@ export interface ProvidersListDependencies {
24
24
  getAdapters: () => ProviderAdapter[];
25
25
  getSyncMappings: (adapter: ProviderAdapter, scope: Scope) => PathMapping[];
26
26
  loadManifest: (manifestPath: string) => Promise<Manifest>;
27
- detectDrift: (entry: Manifest['entries'][number], scopeRoot: string) => Promise<DriftReport>;
27
+ detectDrift: (entry: Manifest['entries'][number], scopeRoot: string, copyTransform?: CopyTransform) => Promise<DriftReport>;
28
28
  }
29
29
  export interface ProviderInspectMappingState {
30
30
  scope: ConcreteScope;
@@ -51,7 +51,7 @@ export interface ProvidersInspectDependencies {
51
51
  getAdapters: () => ProviderAdapter[];
52
52
  getSyncMappings: (adapter: ProviderAdapter, scope: Scope) => PathMapping[];
53
53
  loadManifest: (manifestPath: string) => Promise<Manifest>;
54
- detectDrift: (entry: Manifest['entries'][number], scopeRoot: string) => Promise<DriftReport>;
54
+ detectDrift: (entry: Manifest['entries'][number], scopeRoot: string, copyTransform?: CopyTransform) => Promise<DriftReport>;
55
55
  }
56
56
  export interface ProvidersSetDependencies {
57
57
  buildCommandContext: (options: GlobalOptions) => CommandContext;
@@ -1 +1 @@
1
- {"version":3,"file":"providers.types.d.ts","sourceRoot":"","sources":["../../../src/commands/providers/providers.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,KAAK,EACL,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,YAAY,CAAC;IAC9B,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,MAAM,WAAW,yBAAyB;IACxC,mBAAmB,EAAE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AC5D,cAAc,EAAE,CACd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,KACf,OAAO,CAAC,UAAU,CAAC,CAAC;CAC1B"}
@@ -1,7 +1,7 @@
1
1
  import { type CommandContext, type GlobalOptions } from '../../app/command-context.js';
2
2
  import { type CodexRoleStray } from '../shared/codex-strays.js';
3
3
  import { type MultiSelectChoice, type PromptContext } from '../shared/shared.prompts.js';
4
- import { type DriftReport } from '../../drift/index.js';
4
+ import { type CopyTransform, type DriftReport } from '../../drift/index.js';
5
5
  import { type CanonicalEntry } from '../../engine/index.js';
6
6
  import type { Manifest } from '../../manifest/index.js';
7
7
  import { type CodexExtensionPlan } from '../../providers/codex/codec/sync-extension.js';
@@ -17,7 +17,7 @@ interface StatusDependencies {
17
17
  getAdapters: () => ProviderAdapter[];
18
18
  getActiveAdapters: (adapters: ProviderAdapter[], scopeRoot: string) => Promise<ProviderAdapter[]>;
19
19
  getSyncMappings: (adapter: ProviderAdapter, scope: Scope) => PathMapping[];
20
- detectDrift: (entry: Manifest['entries'][number], scopeRoot: string) => Promise<DriftReport>;
20
+ detectDrift: (entry: Manifest['entries'][number], scopeRoot: string, copyTransform?: CopyTransform) => Promise<DriftReport>;
21
21
  detectStrays: (provider: string, providerDir: string, manifest: Manifest, canonicalEntries: CanonicalEntry[], mapping?: Pick<PathMapping, 'contentType' | 'providerExtension'>) => Promise<DriftReport[]>;
22
22
  detectCodexRoleStrays: (scopeRoot: string, canonicalEntries: CanonicalEntry[]) => Promise<CodexRoleStray[]>;
23
23
  computeCodexProjectExtensionPlan: (scopeRoot: string, canonicalEntries: CanonicalEntry[]) => Promise<CodexExtensionPlan>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/status/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EACL,KAAK,cAAc,EAGpB,MAA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E,CAChC,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,cAAc,EAAE,KAC/B,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACjC,8BAA8B,EAAE,CAC9B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,kBAAkB,KACrB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,mBAAmB,EAAE,CAAC,CAAC,SAAS,MAAM,EACpC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAC/B,GAAG,EAAE,aAAa,KACf,OAAO,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACzB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACzE,UAAU,EAAE,CACV,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,oBAAoB,EAC3B,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,KACrC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvB,iBAAiB,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,MAAM,CAAC;CACvD;AAED,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,YAAY,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAieD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC1C,OAAO,CAcT"}
@@ -4,7 +4,7 @@ import { adoptStrayToCanonical, isAdoptionConflictError, } from '../shared/adopt
4
4
  import { detectCodexRoleStrays, regenerateCodexAfterAdoption, } from '../shared/codex-strays.js';
5
5
  import { confirmAction, selectManyWithAbort, } from '../shared/shared.prompts.js';
6
6
  import { readGlobalOptions, resolveConcreteScopes, } from '../shared/shared.utils.js';
7
- import { detectDrift, detectStrays } from '../../drift/index.js';
7
+ import { detectDrift, detectStrays, } from '../../drift/index.js';
8
8
  import { scanCanonical } from '../../engine/index.js';
9
9
  import { normalizeToPosixPath, resolveProjectRoot, resolveScopeRoot, } from '../../fs/paths.js';
10
10
  import { loadManifest, saveManifest } from '../../manifest/manager.js';
@@ -132,10 +132,15 @@ async function collectScopeReports(scope, context, dependencies) {
132
132
  if (!contentTypeAllowed(entry.contentType, scope)) {
133
133
  continue;
134
134
  }
135
- if (!mappings.some((mapping) => entryInsideMapping(entry.providerPath, mapping.providerDir))) {
135
+ const matchedMapping = mappings.find((mapping) => mapping.contentType === entry.contentType &&
136
+ entryInsideMapping(entry.providerPath, mapping.providerDir));
137
+ if (!matchedMapping) {
136
138
  continue;
137
139
  }
138
- reports.push(await dependencies.detectDrift(entry, scopeRoot));
140
+ const copyTransform = matchedMapping.transformCanonical
141
+ ? { transformCanonical: matchedMapping.transformCanonical }
142
+ : undefined;
143
+ reports.push(await dependencies.detectDrift(entry, scopeRoot, copyTransform));
139
144
  }
140
145
  for (const mapping of mappings) {
141
146
  for (const canonicalEntry of canonicalEntries) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/remove/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AAK1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,gBAAgB,CAAC;AA2CxB,wBAAgB,wBAAwB,CACtC,YAAY,GAAE,uBAA6C,EAC3D,gBAAgB,GAAE,oBAA8C,GAC/D,OAAO,CAsET"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/remove/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AAM1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,gBAAgB,CAAC;AA2CxB,wBAAgB,wBAAwB,CACtC,YAAY,GAAE,uBAA6C,EAC3D,gBAAgB,GAAE,oBAA8C,GAC/D,OAAO,CAwGT"}
@@ -4,6 +4,7 @@ import { buildCommandContext } from '../../../app/command-context.js';
4
4
  import { readGlobalOptions, resolveConcreteScopes, } from '../../shared/shared.utils.js';
5
5
  import { autoSync, } from '../../tools/shared/auto-sync.js';
6
6
  import { scanTools } from '../../tools/shared/scan-tools.js';
7
+ import { readOatConfig, writeOatConfig } from '../../../config/oat-config.js';
7
8
  import { resolveAssetsRoot } from '../../../fs/assets.js';
8
9
  import { resolveProjectRoot, resolveScopeRoot } from '../../../fs/paths.js';
9
10
  import { Command } from 'commander';
@@ -65,6 +66,30 @@ export function createToolsRemoveCommand(dependencies = defaultDependencies, syn
65
66
  const scopes = resolveConcreteScopes(context.scope);
66
67
  const dryRun = opts.dryRun ?? false;
67
68
  const result = await removeTools(target, scopes, context.cwd, context.home, dryRun, dependencies);
69
+ if (!dryRun && result.removed.length > 0) {
70
+ const assetsRoot = await dependencies.resolveAssetsRoot();
71
+ const repoRoot = await resolveProjectRoot(context.cwd);
72
+ const config = await readOatConfig(repoRoot);
73
+ const installedPacks = new Set();
74
+ const configScopes = resolveConcreteScopes('all');
75
+ for (const scope of configScopes) {
76
+ const scopeRoot = await dependencies.resolveScopeRoot(scope, context.cwd, context.home);
77
+ const tools = await dependencies.scanTools({
78
+ scope,
79
+ scopeRoot,
80
+ assetsRoot,
81
+ });
82
+ for (const tool of tools) {
83
+ if (tool.pack !== 'custom') {
84
+ installedPacks.add(tool.pack);
85
+ }
86
+ }
87
+ }
88
+ await writeOatConfig(repoRoot, {
89
+ ...config,
90
+ tools: Object.fromEntries(VALID_PACKS.map((pack) => [pack, installedPacks.has(pack)])),
91
+ });
92
+ }
68
93
  if (result.notInstalled.length > 0) {
69
94
  if (context.json) {
70
95
  logger.json({ target: describeTarget(target), dryRun, result });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/update/index.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGvE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAE7B,MAAM,gBAAgB,CAAC;AAuCxB,wBAAgB,wBAAwB,CACtC,YAAY,GAAE,uBAA6C,EAC3D,gBAAgB,GAAE,oBAA8C,GAC/D,OAAO,CAmGT;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,YAAY,GACnB,OAAO,CAOT;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,OAAO,GACd,MAAM,CAMR"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/update/index.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAIvE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAE7B,MAAM,gBAAgB,CAAC;AAuCxB,wBAAgB,wBAAwB,CACtC,YAAY,GAAE,uBAA6C,EAC3D,gBAAgB,GAAE,oBAA8C,GAC/D,OAAO,CAsIT;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,YAAY,GACnB,OAAO,CAOT;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,OAAO,GACd,MAAM,CAMR"}
@@ -5,6 +5,7 @@ import { copyDirWithStatus, copyFileWithStatus, } from '../../init/tools/shared/
5
5
  import { readGlobalOptions, resolveConcreteScopes, } from '../../shared/shared.utils.js';
6
6
  import { autoSync, } from '../../tools/shared/auto-sync.js';
7
7
  import { scanTools } from '../../tools/shared/scan-tools.js';
8
+ import { readOatConfig, writeOatConfig } from '../../../config/oat-config.js';
8
9
  import { resolveAssetsRoot } from '../../../fs/assets.js';
9
10
  import { resolveProjectRoot, resolveScopeRoot } from '../../../fs/paths.js';
10
11
  import { Command } from 'commander';
@@ -62,15 +63,40 @@ export function createToolsUpdateCommand(dependencies = defaultDependencies, syn
62
63
  const scopes = resolveConcreteScopes(context.scope);
63
64
  const dryRun = opts.dryRun ?? false;
64
65
  const result = await updateTools(target, scopes, context.cwd, context.home, dryRun, dependencies);
66
+ const assetsRoot = dryRun ? null : await dependencies.resolveAssetsRoot();
65
67
  // Refresh ~/.oat/docs/ when the core pack is explicitly updated or
66
68
  // reconciled through --all (D3 requirement).
67
- if (shouldRefreshCoreDocs(target, result) && !dryRun) {
68
- const assetsRoot = await dependencies.resolveAssetsRoot();
69
+ if (shouldRefreshCoreDocs(target, result) && assetsRoot) {
69
70
  const userRoot = await dependencies.resolveScopeRoot('user', context.cwd, context.home);
70
71
  const docsSource = join(assetsRoot, 'docs');
71
72
  const docsDestination = join(userRoot, '.oat', 'docs');
72
73
  await dependencies.copyDirWithStatus(docsSource, docsDestination, true);
73
74
  }
75
+ if (assetsRoot && (target.kind === 'all' || target.kind === 'pack')) {
76
+ const repoRoot = await resolveProjectRoot(context.cwd);
77
+ const config = await readOatConfig(repoRoot);
78
+ const installedPacks = new Set();
79
+ const configScopes = resolveConcreteScopes('all');
80
+ for (const scope of configScopes) {
81
+ const scopeRoot = await dependencies.resolveScopeRoot(scope, context.cwd, context.home);
82
+ const tools = await dependencies.scanTools({
83
+ scope,
84
+ scopeRoot,
85
+ assetsRoot,
86
+ });
87
+ for (const tool of tools) {
88
+ if (tool.pack !== 'custom') {
89
+ installedPacks.add(tool.pack);
90
+ }
91
+ }
92
+ }
93
+ // Preserve unrelated shared config keys while rebuilding tools state
94
+ // from the repo-wide installed-pack scan.
95
+ await writeOatConfig(repoRoot, {
96
+ ...config,
97
+ tools: Object.fromEntries(VALID_PACKS.map((pack) => [pack, installedPacks.has(pack)])),
98
+ });
99
+ }
74
100
  if (result.notInstalled.length > 0) {
75
101
  if (context.json) {
76
102
  logger.json({ target: describeTarget(target), dryRun, result });
@@ -13,6 +13,7 @@ export interface OatArchiveConfig {
13
13
  s3SyncOnComplete?: boolean;
14
14
  summaryExportPath?: string;
15
15
  }
16
+ export type OatToolsConfig = Partial<Record<'core' | 'ideas' | 'docs' | 'workflows' | 'utility' | 'project-management' | 'research', boolean>>;
16
17
  export interface OatConfig {
17
18
  version: number;
18
19
  worktrees?: {
@@ -23,6 +24,7 @@ export interface OatConfig {
23
24
  };
24
25
  git?: OatGitConfig;
25
26
  archive?: OatArchiveConfig;
27
+ tools?: OatToolsConfig;
26
28
  documentation?: OatDocumentationConfig;
27
29
  localPaths?: string[];
28
30
  autoReviewAtCheckpoints?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"oat-config.d.ts","sourceRoot":"","sources":["../../src/config/oat-config.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,aAAa,CAAC,EAAE,M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AC,IAAI,CAAC,CAIf;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQxB;AAED,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMrE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA6B5D"}
@@ -93,6 +93,26 @@ function normalizeOatConfig(parsed) {
93
93
  next.archive = archive;
94
94
  }
95
95
  }
96
+ if (isRecord(parsed.tools)) {
97
+ const validPacks = [
98
+ 'core',
99
+ 'ideas',
100
+ 'docs',
101
+ 'workflows',
102
+ 'utility',
103
+ 'project-management',
104
+ 'research',
105
+ ];
106
+ const tools = {};
107
+ for (const pack of validPacks) {
108
+ if (typeof parsed.tools[pack] === 'boolean') {
109
+ tools[pack] = parsed.tools[pack];
110
+ }
111
+ }
112
+ if (Object.keys(tools).length > 0) {
113
+ next.tools = tools;
114
+ }
115
+ }
96
116
  if (isRecord(parsed.documentation)) {
97
117
  const doc = {};
98
118
  if (typeof parsed.documentation.root === 'string' &&
@@ -1,4 +1,7 @@
1
1
  import type { ManifestEntry } from '../manifest/manifest.types.js';
2
2
  import type { DriftReport } from './drift.types.js';
3
- export declare function detectDrift(entry: ManifestEntry, scopeRoot: string): Promise<DriftReport>;
3
+ export interface CopyTransform {
4
+ transformCanonical: (content: string, canonicalPath: string) => string;
5
+ }
6
+ export declare function detectDrift(entry: ManifestEntry, scopeRoot: string, copyTransform?: CopyTransform): Promise<DriftReport>;
4
7
  //# sourceMappingURL=detector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../src/drift/detector.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAcjD,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,WAAW,CAAC,CAmEtB"}
1
+ {"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../src/drift/detector.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC5B,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,MAAM,CAAC;CACxE;AAcD,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,MAAM,EACjB,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,WAAW,CAAC,CAkFtB"}
@@ -1,6 +1,6 @@
1
- import { lstat, readlink, stat } from 'node:fs/promises';
1
+ import { lstat, readFile, readlink, stat } from 'node:fs/promises';
2
2
  import { dirname, resolve } from 'node:path';
3
- import { computeContentHash } from '../manifest/hash.js';
3
+ import { computeContentHash, computeStringHash } from '../manifest/hash.js';
4
4
  function createReport(entry, state) {
5
5
  return {
6
6
  canonical: entry.canonicalPath,
@@ -9,7 +9,7 @@ function createReport(entry, state) {
9
9
  state,
10
10
  };
11
11
  }
12
- export async function detectDrift(entry, scopeRoot) {
12
+ export async function detectDrift(entry, scopeRoot, copyTransform) {
13
13
  const providerPath = resolve(scopeRoot, entry.providerPath);
14
14
  const canonicalPath = resolve(scopeRoot, entry.canonicalPath);
15
15
  // Missing check must run first, before strategy-specific branches.
@@ -62,6 +62,17 @@ export async function detectDrift(entry, scopeRoot) {
62
62
  if (entry.contentHash === currentHash) {
63
63
  return createReport(entry, { status: 'in_sync' });
64
64
  }
65
+ // When the manifest hash is stale (e.g. frontmatter-only edits to the
66
+ // canonical source that don't change the rendered output), re-derive the
67
+ // expected provider content from the current canonical + transform and
68
+ // compare that instead.
69
+ if (copyTransform && entry.isFile) {
70
+ const canonicalContent = await readFile(canonicalPath, 'utf8');
71
+ const rendered = copyTransform.transformCanonical(canonicalContent, entry.canonicalPath);
72
+ if (computeStringHash(rendered) === currentHash) {
73
+ return createReport(entry, { status: 'in_sync' });
74
+ }
75
+ }
65
76
  return createReport(entry, {
66
77
  status: 'drifted',
67
78
  reason: 'modified',
@@ -1,4 +1,5 @@
1
1
  export { detectDrift } from './detector.js';
2
+ export type { CopyTransform } from './detector.js';
2
3
  export type { DriftReport, DriftState } from './drift.types.js';
3
4
  export { detectStrays } from './strays.js';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/drift/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/drift/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-agent-toolkit/cli",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "private": false,
5
5
  "description": "Open Agent Toolkit CLI",
6
6
  "homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",