@open-agent-toolkit/cli 0.2.14 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/docs/cli-utilities/config-and-local-state.md +14 -1
- package/assets/docs/cli-utilities/configuration.md +23 -2
- package/assets/docs/cli-utilities/tool-packs.md +43 -17
- package/assets/docs/provider-sync/providers.md +26 -0
- package/assets/docs/reference/troubleshooting.md +42 -0
- package/assets/docs/workflows/projects/lifecycle.md +2 -2
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-agent-instructions-analyze/SKILL.md +2 -2
- package/assets/skills/oat-brainstorm/SKILL.md +8 -8
- package/assets/skills/oat-brainstorm/references/destinations.md +3 -3
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +2 -2
- package/assets/skills/oat-project-document/SKILL.md +4 -4
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +2 -2
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +2 -2
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +2 -2
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +2 -2
- package/assets/skills/oat-project-summary/SKILL.md +9 -9
- package/dist/commands/init/tools/brainstorm/index.d.ts +0 -3
- package/dist/commands/init/tools/brainstorm/index.d.ts.map +1 -1
- package/dist/commands/init/tools/brainstorm/index.js +0 -12
- package/dist/commands/init/tools/index.d.ts.map +1 -1
- package/dist/commands/init/tools/index.js +46 -25
- package/dist/commands/tools/has/has-pack.d.ts +18 -0
- package/dist/commands/tools/has/has-pack.d.ts.map +1 -0
- package/dist/commands/tools/has/has-pack.js +33 -0
- package/dist/commands/tools/has/index.d.ts +4 -0
- package/dist/commands/tools/has/index.d.ts.map +1 -0
- package/dist/commands/tools/has/index.js +57 -0
- package/dist/commands/tools/index.d.ts.map +1 -1
- package/dist/commands/tools/index.js +2 -0
- package/dist/commands/tools/remove/index.d.ts.map +1 -1
- package/dist/commands/tools/remove/index.js +10 -20
- package/dist/commands/tools/shared/project-tools-config.d.ts +16 -0
- package/dist/commands/tools/shared/project-tools-config.d.ts.map +1 -0
- package/dist/commands/tools/shared/project-tools-config.js +59 -0
- package/dist/commands/tools/update/index.d.ts.map +1 -1
- package/dist/commands/tools/update/index.js +11 -22
- package/dist/engine/compute-plan.d.ts.map +1 -1
- package/dist/engine/compute-plan.js +8 -2
- package/dist/engine/execute-plan.d.ts +5 -1
- package/dist/engine/execute-plan.d.ts.map +1 -1
- package/dist/engine/execute-plan.js +23 -1
- package/dist/engine/index.d.ts +1 -0
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +1 -0
- package/dist/engine/provider-path-safety.d.ts +2 -0
- package/dist/engine/provider-path-safety.d.ts.map +1 -0
- package/dist/engine/provider-path-safety.js +54 -0
- package/package.json +2 -2
|
@@ -239,9 +239,9 @@ remains immutable baseline evidence for the original p01-t01 verification.
|
|
|
239
239
|
| `oat-project-implement/references/docs/autonomy-contract.md` | `* -> NG` |
|
|
240
240
|
| `oat-project-implement/references/phase-execution.md` | `27737e814790 -> NG`; `6dda2b8e62e2 -> IMPLEMENT-10`; `b3197086bb1e -> IMPLEMENT-10` |
|
|
241
241
|
| `oat-project-implement/references/plan-and-resume.md` | `413829d31e32 -> IMPLEMENT-02`; `c7706cd8ad09 -> IMPLEMENT-03`; `a80a948df658 -> IMPLEMENT-03`; `b7ea139780ec -> IMPLEMENT-03+IMPLEMENT-04`; `8d438f2180ba -> IMPLEMENT-03`; `9e72e0518cda -> IMPLEMENT-03`; `3e177a1021e6 -> IMPLEMENT-03+IMPLEMENT-04`; `b59fc9eb9ce3 -> IMPLEMENT-03`; `a2b1d6855283 -> IMPLEMENT-03`; `44351a32e52a -> IMPLEMENT-03`; `b98b022f5523 -> IMPLEMENT-03`; `e9f5b949e214 -> IMPLEMENT-03`; `316fb6d9e980 -> IMPLEMENT-03`; `8b25a2c5c548 -> IMPLEMENT-03`; `1a59b1c0e705 -> IMPLEMENT-03`; `466cd562fc52 -> IMPLEMENT-03`; `083d896978d5 -> IMPLEMENT-03`; `f4ab11c13ae9 -> IMPLEMENT-03`; `7dc17ffcc1c4 -> IMPLEMENT-03`; `f731a90adabd -> IMPLEMENT-04`; `886ac01e7aa9 -> IMPLEMENT-04`; `b715db67df0c -> IMPLEMENT-04`; `2d9f26a539f3 -> IMPLEMENT-10`; `28384dee114f -> IMPLEMENT-05`; `f2591a4978b4 -> NG`; `8290823080b5 -> IMPLEMENT-06`; `f75789bf6c8e -> IMPLEMENT-07` |
|
|
242
|
-
| `oat-project-document/SKILL.md` | `4fc2d8618208 -> NG`; `
|
|
242
|
+
| `oat-project-document/SKILL.md` | `4fc2d8618208 -> NG`; `3f9b0273ba77 -> NG`; `40f8be47affa -> NG`; `3a3c390528f3 -> DOCUMENT-03`; `2a7ba093b315 -> DOCUMENT-02`; `252aabe44db2 -> DOCUMENT-02`; `3751172de299 -> DOCUMENT-02`; `b987a0697ba9 -> DOCUMENT-01`; `a06ff3ca7926 -> NG`; `0d04714ca9fc -> NG`; `f79af01d94c6 -> DOCUMENT-02`; `71634113c348 -> DOCUMENT-02`; `cdb707f5081e -> NG` |
|
|
243
243
|
| `oat-project-document/references/docs/autonomy-contract.md` | `* -> NG` |
|
|
244
|
-
| `oat-project-summary/SKILL.md` | `68c197c44c18 -> NG`; `a167d03559fa -> NG`; `cf317c17c586 -> SUMMARY-01`; `
|
|
244
|
+
| `oat-project-summary/SKILL.md` | `68c197c44c18 -> NG`; `a167d03559fa -> NG`; `cf317c17c586 -> SUMMARY-01`; `8ff515033147 -> NG`; `ac36f854dd6b -> NG`; `f3e49b727752 -> NG`; `5f315ab87cb1 -> NG`; `e73bd88837ea -> NG`; `83257ff6cb68 -> NG`; `c8fced47ef8e -> NG`; `d7ea1e2a4f5f -> NG` |
|
|
245
245
|
| `oat-project-pr-final/SKILL.md` | `601ac2b890f2 -> NG`; `5eb3949f32e1 -> NG`; `9efcbcee42ea -> NG`; `655d61df0a8f -> NG`; `cf317c17c586 -> PRFINAL-01`; `2de348a391c0 -> PRFINAL-03` |
|
|
246
246
|
| `oat-project-pr-final/references/docs/autonomy-contract.md` | `* -> NG` |
|
|
247
247
|
| `oat-project-complete/SKILL.md` | `6ed459f9e462 -> NG`; `a167d03559fa -> NG`; `79c2eeed668c -> COMPLETE-01`; `2c1514b9d9af -> COMPLETE-01`; `31c750b4fea7 -> COMPLETE-01`; `cfba413b1293 -> COMPLETE-01`; `ffcdc9d576c0 -> COMPLETE-01`; `7fcfce0423ac -> COMPLETE-01`; `9497d9f94eed -> COMPLETE-01`; `7b59c728d3fb -> COMPLETE-01`; `48e10a9636fe -> COMPLETE-01`; `c0dad37fc166 -> COMPLETE-01`; `aa9a36243ec1 -> COMPLETE-01`; `7bcbf58b54e9 -> NG`; `4c7f88a7f942 -> COMPLETE-02`; `6a1a95acc8cc -> COMPLETE-02`; `3b559956b3eb -> COMPLETE-03`; `14d161cdf99b -> COMPLETE-03`; `12f7c30a54c8 -> NG`; `fffe5eea5ebd -> NG` |
|
|
@@ -239,9 +239,9 @@ remains immutable baseline evidence for the original p01-t01 verification.
|
|
|
239
239
|
| `oat-project-implement/references/docs/autonomy-contract.md` | `* -> NG` |
|
|
240
240
|
| `oat-project-implement/references/phase-execution.md` | `27737e814790 -> NG`; `6dda2b8e62e2 -> IMPLEMENT-10`; `b3197086bb1e -> IMPLEMENT-10` |
|
|
241
241
|
| `oat-project-implement/references/plan-and-resume.md` | `413829d31e32 -> IMPLEMENT-02`; `c7706cd8ad09 -> IMPLEMENT-03`; `a80a948df658 -> IMPLEMENT-03`; `b7ea139780ec -> IMPLEMENT-03+IMPLEMENT-04`; `8d438f2180ba -> IMPLEMENT-03`; `9e72e0518cda -> IMPLEMENT-03`; `3e177a1021e6 -> IMPLEMENT-03+IMPLEMENT-04`; `b59fc9eb9ce3 -> IMPLEMENT-03`; `a2b1d6855283 -> IMPLEMENT-03`; `44351a32e52a -> IMPLEMENT-03`; `b98b022f5523 -> IMPLEMENT-03`; `e9f5b949e214 -> IMPLEMENT-03`; `316fb6d9e980 -> IMPLEMENT-03`; `8b25a2c5c548 -> IMPLEMENT-03`; `1a59b1c0e705 -> IMPLEMENT-03`; `466cd562fc52 -> IMPLEMENT-03`; `083d896978d5 -> IMPLEMENT-03`; `f4ab11c13ae9 -> IMPLEMENT-03`; `7dc17ffcc1c4 -> IMPLEMENT-03`; `f731a90adabd -> IMPLEMENT-04`; `886ac01e7aa9 -> IMPLEMENT-04`; `b715db67df0c -> IMPLEMENT-04`; `2d9f26a539f3 -> IMPLEMENT-10`; `28384dee114f -> IMPLEMENT-05`; `f2591a4978b4 -> NG`; `8290823080b5 -> IMPLEMENT-06`; `f75789bf6c8e -> IMPLEMENT-07` |
|
|
242
|
-
| `oat-project-document/SKILL.md` | `4fc2d8618208 -> NG`; `
|
|
242
|
+
| `oat-project-document/SKILL.md` | `4fc2d8618208 -> NG`; `3f9b0273ba77 -> NG`; `40f8be47affa -> NG`; `3a3c390528f3 -> DOCUMENT-03`; `2a7ba093b315 -> DOCUMENT-02`; `252aabe44db2 -> DOCUMENT-02`; `3751172de299 -> DOCUMENT-02`; `b987a0697ba9 -> DOCUMENT-01`; `a06ff3ca7926 -> NG`; `0d04714ca9fc -> NG`; `f79af01d94c6 -> DOCUMENT-02`; `71634113c348 -> DOCUMENT-02`; `cdb707f5081e -> NG` |
|
|
243
243
|
| `oat-project-document/references/docs/autonomy-contract.md` | `* -> NG` |
|
|
244
|
-
| `oat-project-summary/SKILL.md` | `68c197c44c18 -> NG`; `a167d03559fa -> NG`; `cf317c17c586 -> SUMMARY-01`; `
|
|
244
|
+
| `oat-project-summary/SKILL.md` | `68c197c44c18 -> NG`; `a167d03559fa -> NG`; `cf317c17c586 -> SUMMARY-01`; `8ff515033147 -> NG`; `ac36f854dd6b -> NG`; `f3e49b727752 -> NG`; `5f315ab87cb1 -> NG`; `e73bd88837ea -> NG`; `83257ff6cb68 -> NG`; `c8fced47ef8e -> NG`; `d7ea1e2a4f5f -> NG` |
|
|
245
245
|
| `oat-project-pr-final/SKILL.md` | `601ac2b890f2 -> NG`; `5eb3949f32e1 -> NG`; `9efcbcee42ea -> NG`; `655d61df0a8f -> NG`; `cf317c17c586 -> PRFINAL-01`; `2de348a391c0 -> PRFINAL-03` |
|
|
246
246
|
| `oat-project-pr-final/references/docs/autonomy-contract.md` | `* -> NG` |
|
|
247
247
|
| `oat-project-complete/SKILL.md` | `6ed459f9e462 -> NG`; `a167d03559fa -> NG`; `79c2eeed668c -> COMPLETE-01`; `2c1514b9d9af -> COMPLETE-01`; `31c750b4fea7 -> COMPLETE-01`; `cfba413b1293 -> COMPLETE-01`; `ffcdc9d576c0 -> COMPLETE-01`; `7fcfce0423ac -> COMPLETE-01`; `9497d9f94eed -> COMPLETE-01`; `7b59c728d3fb -> COMPLETE-01`; `48e10a9636fe -> COMPLETE-01`; `c0dad37fc166 -> COMPLETE-01`; `aa9a36243ec1 -> COMPLETE-01`; `7bcbf58b54e9 -> NG`; `4c7f88a7f942 -> COMPLETE-02`; `6a1a95acc8cc -> COMPLETE-02`; `3b559956b3eb -> COMPLETE-03`; `14d161cdf99b -> COMPLETE-03`; `12f7c30a54c8 -> NG`; `fffe5eea5ebd -> NG` |
|
|
@@ -239,9 +239,9 @@ remains immutable baseline evidence for the original p01-t01 verification.
|
|
|
239
239
|
| `oat-project-implement/references/docs/autonomy-contract.md` | `* -> NG` |
|
|
240
240
|
| `oat-project-implement/references/phase-execution.md` | `27737e814790 -> NG`; `6dda2b8e62e2 -> IMPLEMENT-10`; `b3197086bb1e -> IMPLEMENT-10` |
|
|
241
241
|
| `oat-project-implement/references/plan-and-resume.md` | `413829d31e32 -> IMPLEMENT-02`; `c7706cd8ad09 -> IMPLEMENT-03`; `a80a948df658 -> IMPLEMENT-03`; `b7ea139780ec -> IMPLEMENT-03+IMPLEMENT-04`; `8d438f2180ba -> IMPLEMENT-03`; `9e72e0518cda -> IMPLEMENT-03`; `3e177a1021e6 -> IMPLEMENT-03+IMPLEMENT-04`; `b59fc9eb9ce3 -> IMPLEMENT-03`; `a2b1d6855283 -> IMPLEMENT-03`; `44351a32e52a -> IMPLEMENT-03`; `b98b022f5523 -> IMPLEMENT-03`; `e9f5b949e214 -> IMPLEMENT-03`; `316fb6d9e980 -> IMPLEMENT-03`; `8b25a2c5c548 -> IMPLEMENT-03`; `1a59b1c0e705 -> IMPLEMENT-03`; `466cd562fc52 -> IMPLEMENT-03`; `083d896978d5 -> IMPLEMENT-03`; `f4ab11c13ae9 -> IMPLEMENT-03`; `7dc17ffcc1c4 -> IMPLEMENT-03`; `f731a90adabd -> IMPLEMENT-04`; `886ac01e7aa9 -> IMPLEMENT-04`; `b715db67df0c -> IMPLEMENT-04`; `2d9f26a539f3 -> IMPLEMENT-10`; `28384dee114f -> IMPLEMENT-05`; `f2591a4978b4 -> NG`; `8290823080b5 -> IMPLEMENT-06`; `f75789bf6c8e -> IMPLEMENT-07` |
|
|
242
|
-
| `oat-project-document/SKILL.md` | `4fc2d8618208 -> NG`; `
|
|
242
|
+
| `oat-project-document/SKILL.md` | `4fc2d8618208 -> NG`; `3f9b0273ba77 -> NG`; `40f8be47affa -> NG`; `3a3c390528f3 -> DOCUMENT-03`; `2a7ba093b315 -> DOCUMENT-02`; `252aabe44db2 -> DOCUMENT-02`; `3751172de299 -> DOCUMENT-02`; `b987a0697ba9 -> DOCUMENT-01`; `a06ff3ca7926 -> NG`; `0d04714ca9fc -> NG`; `f79af01d94c6 -> DOCUMENT-02`; `71634113c348 -> DOCUMENT-02`; `cdb707f5081e -> NG` |
|
|
243
243
|
| `oat-project-document/references/docs/autonomy-contract.md` | `* -> NG` |
|
|
244
|
-
| `oat-project-summary/SKILL.md` | `68c197c44c18 -> NG`; `a167d03559fa -> NG`; `cf317c17c586 -> SUMMARY-01`; `
|
|
244
|
+
| `oat-project-summary/SKILL.md` | `68c197c44c18 -> NG`; `a167d03559fa -> NG`; `cf317c17c586 -> SUMMARY-01`; `8ff515033147 -> NG`; `ac36f854dd6b -> NG`; `f3e49b727752 -> NG`; `5f315ab87cb1 -> NG`; `e73bd88837ea -> NG`; `83257ff6cb68 -> NG`; `c8fced47ef8e -> NG`; `d7ea1e2a4f5f -> NG` |
|
|
245
245
|
| `oat-project-pr-final/SKILL.md` | `601ac2b890f2 -> NG`; `5eb3949f32e1 -> NG`; `9efcbcee42ea -> NG`; `655d61df0a8f -> NG`; `cf317c17c586 -> PRFINAL-01`; `2de348a391c0 -> PRFINAL-03` |
|
|
246
246
|
| `oat-project-pr-final/references/docs/autonomy-contract.md` | `* -> NG` |
|
|
247
247
|
| `oat-project-complete/SKILL.md` | `6ed459f9e462 -> NG`; `a167d03559fa -> NG`; `79c2eeed668c -> COMPLETE-01`; `2c1514b9d9af -> COMPLETE-01`; `31c750b4fea7 -> COMPLETE-01`; `cfba413b1293 -> COMPLETE-01`; `ffcdc9d576c0 -> COMPLETE-01`; `7fcfce0423ac -> COMPLETE-01`; `9497d9f94eed -> COMPLETE-01`; `7b59c728d3fb -> COMPLETE-01`; `48e10a9636fe -> COMPLETE-01`; `c0dad37fc166 -> COMPLETE-01`; `aa9a36243ec1 -> COMPLETE-01`; `7bcbf58b54e9 -> NG`; `4c7f88a7f942 -> COMPLETE-02`; `6a1a95acc8cc -> COMPLETE-02`; `3b559956b3eb -> COMPLETE-03`; `14d161cdf99b -> COMPLETE-03`; `12f7c30a54c8 -> NG`; `fffe5eea5ebd -> NG` |
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-summary
|
|
3
|
-
version: 1.3.
|
|
3
|
+
version: 1.3.5
|
|
4
4
|
description: Use when the user requests or confirms summarizing an active OAT project — e.g. "summarize the project", "generate the summary", "run oat-project-summary", or confirms a previously offered summary run. Do NOT auto-invoke when implementation completes. Generates summary.md from project artifacts as institutional memory.
|
|
5
5
|
disable-model-invocation: false
|
|
6
6
|
user-invocable: true
|
|
7
|
-
allowed-tools: Read, Write, Bash(git:*), Bash(oat config:*), Bash(oat decision:*), Bash(oat project log:*), Glob, Grep, AskUserQuestion
|
|
7
|
+
allowed-tools: Read, Write, Bash(git:*), Bash(oat config:*), Bash(oat decision:*), Bash(oat project log:*), Bash(oat tools:*), Glob, Grep, AskUserQuestion
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Project Summary
|
|
@@ -40,7 +40,7 @@ When executing this skill, provide lightweight progress feedback so the user can
|
|
|
40
40
|
- `[2/6] Checking project log + existing summary…`
|
|
41
41
|
- `[3/6] Generating / updating summary sections…`
|
|
42
42
|
- `[4/6] Rolling up project observations…`
|
|
43
|
-
- `[5/6] Promoting key decisions to reference/decisions/ (if PJM
|
|
43
|
+
- `[5/6] Promoting key decisions to reference/decisions/ (if PJM is available)…`
|
|
44
44
|
- `[6/6] Committing…`
|
|
45
45
|
|
|
46
46
|
**BLOCKED Activities:**
|
|
@@ -59,7 +59,7 @@ When executing this skill, provide lightweight progress feedback so the user can
|
|
|
59
59
|
- ✅ Offering follow-up-marked project-log entries to
|
|
60
60
|
`oat-pjm-add-backlog-item`
|
|
61
61
|
- ✅ Committing summary.md changes
|
|
62
|
-
- ✅ Promoting the summary's Key Decisions into canonical `reference/decisions/` records via `oat decision new` (Step 7), gated on the PJM tool pack being
|
|
62
|
+
- ✅ Promoting the summary's Key Decisions into canonical `reference/decisions/` records via `oat decision new` (Step 7), gated on the PJM tool pack being available
|
|
63
63
|
|
|
64
64
|
**Self-Correction Protocol:**
|
|
65
65
|
If you catch yourself:
|
|
@@ -360,10 +360,10 @@ append-based `project` → `general` promotion in Step 2.5.
|
|
|
360
360
|
|
|
361
361
|
Run this step **after** `summary.md` (including its `## Key Decisions` section) has been written/refreshed and its frontmatter updated. It promotes the project's Key Decisions out of per-project prose and into the canonical, repo-wide `reference/decisions/` log so they stop being siloed in `summary.md`. This step is **additive and non-interactive** — it never prompts.
|
|
362
362
|
|
|
363
|
-
**7.1 — PJM gate (auto, no prompt).** Check whether the PJM tool pack is
|
|
363
|
+
**7.1 — PJM gate (auto, no prompt).** Check whether the PJM tool pack is effectively available:
|
|
364
364
|
|
|
365
365
|
```bash
|
|
366
|
-
PJM_ENABLED=$(oat
|
|
366
|
+
PJM_ENABLED=$(oat tools has project-management 2>/dev/null || echo "")
|
|
367
367
|
```
|
|
368
368
|
|
|
369
369
|
- If `PJM_ENABLED` is `true` → perform the promotion automatically. Do NOT ask the user.
|
|
@@ -455,7 +455,7 @@ Summary generated for {project-name}.
|
|
|
455
455
|
Sections: {list of non-empty sections included}
|
|
456
456
|
Lines: {line count}
|
|
457
457
|
Mode: {fresh | incremental update}
|
|
458
|
-
Decisions promoted: {N created, M skipped as already promoted | skipped (PJM
|
|
458
|
+
Decisions promoted: {N created, M skipped as already promoted | skipped (PJM unavailable)}
|
|
459
459
|
|
|
460
460
|
Summary tracks: last task {task_id}, {N} revision phases
|
|
461
461
|
```
|
|
@@ -481,7 +481,7 @@ Summary tracks: last task {task_id}, {N} revision phases
|
|
|
481
481
|
`skipped_permitted` proceeds with a note
|
|
482
482
|
- Follow-up-marked project-log entries use backlog graduation separately from
|
|
483
483
|
ledger graduation
|
|
484
|
-
- When the PJM tool pack is
|
|
485
|
-
- When the PJM tool pack is
|
|
484
|
+
- When the PJM tool pack is available, each Key Decision is promoted to a canonical `reference/decisions/DR-YYMMDD-slug` record via `oat decision new` (status `accepted`), deduped on the date-independent slug so re-runs never create duplicate records
|
|
485
|
+
- When the PJM tool pack is unavailable, decision promotion is skipped silently with no prompt
|
|
486
486
|
- A project-recap attempt appears once in a concise Explainer Outcome section
|
|
487
487
|
sourced from its manifest and build record
|
|
@@ -2,7 +2,6 @@ import { type CommandContext, type GlobalOptions } from '../../../../app/command
|
|
|
2
2
|
import { type PromptContext } from '../../../shared/shared.prompts.js';
|
|
3
3
|
import { type ScanToolsOptions } from '../../../tools/shared/scan-tools.js';
|
|
4
4
|
import type { ToolInfo } from '../../../tools/shared/types.js';
|
|
5
|
-
import { type OatConfig } from '../../../../config/oat-config.js';
|
|
6
5
|
import { Command } from 'commander';
|
|
7
6
|
import { type InstallBrainstormOptions, type InstallBrainstormResult } from './install-brainstorm.js';
|
|
8
7
|
type InstallScope = 'project' | 'user';
|
|
@@ -14,8 +13,6 @@ interface InitToolsBrainstormDependencies {
|
|
|
14
13
|
installBrainstorm: (options: InstallBrainstormOptions) => Promise<InstallBrainstormResult>;
|
|
15
14
|
confirmAction: (message: string, ctx: PromptContext) => Promise<boolean>;
|
|
16
15
|
scanTools: (options: ScanToolsOptions) => Promise<ToolInfo[]>;
|
|
17
|
-
readOatConfig: (repoRoot: string) => Promise<OatConfig>;
|
|
18
|
-
writeOatConfig: (repoRoot: string, config: OatConfig) => Promise<void>;
|
|
19
16
|
}
|
|
20
17
|
export declare function createInitToolsBrainstormCommand(overrides?: Partial<InitToolsBrainstormDependencies>): Command;
|
|
21
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/brainstorm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/brainstorm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAG7D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAM9B,KAAK,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC;AAEvC,UAAU,+BAA+B;IACvC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,gBAAgB,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7E,iBAAiB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACzC,iBAAiB,EAAE,CACjB,OAAO,EAAE,wBAAwB,KAC9B,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACzE,SAAS,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;CAC/D;AA+JD,wBAAgB,gCAAgC,CAC9C,SAAS,GAAE,OAAO,CAAC,+BAA+B,CAAM,GACvD,OAAO,CA2BT"}
|
|
@@ -5,7 +5,6 @@ import { confirmAction, } from '../../../shared/shared.prompts.js';
|
|
|
5
5
|
import { readGlobalOptions } from '../../../shared/shared.utils.js';
|
|
6
6
|
import { canonicalPathsForPack, setInstalledCanonicalPaths, } from '../../../tools/shared/install-sync-context.js';
|
|
7
7
|
import { scanTools as defaultScanTools, } from '../../../tools/shared/scan-tools.js';
|
|
8
|
-
import { readOatConfig as defaultReadOatConfig, writeOatConfig as defaultWriteOatConfig, } from '../../../../config/oat-config.js';
|
|
9
8
|
import { resolveAssetsRoot } from '../../../../fs/assets.js';
|
|
10
9
|
import { resolveProjectRoot, resolveScopeRoot } from '../../../../fs/paths.js';
|
|
11
10
|
import { Command } from 'commander';
|
|
@@ -18,8 +17,6 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
18
17
|
installBrainstorm: defaultInstallBrainstorm,
|
|
19
18
|
confirmAction,
|
|
20
19
|
scanTools: defaultScanTools,
|
|
21
|
-
readOatConfig: defaultReadOatConfig,
|
|
22
|
-
writeOatConfig: defaultWriteOatConfig,
|
|
23
20
|
};
|
|
24
21
|
async function resolveInstallScope(context, projectRoot, userRoot, assetsRoot, dependencies) {
|
|
25
22
|
// Honor explicit --scope before any existing-install or default
|
|
@@ -81,11 +78,6 @@ function reportSuccess(context, scope, targetRoot, assetsRoot, result) {
|
|
|
81
78
|
context.logger.info(`Skills: ${counts.skills}`);
|
|
82
79
|
context.logger.info(`Run: oat sync --scope ${scope}`);
|
|
83
80
|
}
|
|
84
|
-
async function persistConfigAfterInstall(projectRoot, dependencies) {
|
|
85
|
-
const config = await dependencies.readOatConfig(projectRoot);
|
|
86
|
-
const tools = { ...(config.tools ?? {}), brainstorm: true };
|
|
87
|
-
await dependencies.writeOatConfig(projectRoot, { ...config, tools });
|
|
88
|
-
}
|
|
89
81
|
async function runInitToolsBrainstorm(context, options, dependencies) {
|
|
90
82
|
try {
|
|
91
83
|
const projectRoot = await dependencies.resolveProjectRoot(context.cwd);
|
|
@@ -108,10 +100,6 @@ async function runInitToolsBrainstorm(context, options, dependencies) {
|
|
|
108
100
|
targetRoot,
|
|
109
101
|
force: options.force,
|
|
110
102
|
});
|
|
111
|
-
// Persist tools.brainstorm: true to .oat/config.json after a
|
|
112
|
-
// successful install so config-write semantics match the main
|
|
113
|
-
// installer flow used by `oat init tools`.
|
|
114
|
-
await persistConfigAfterInstall(projectRoot, dependencies);
|
|
115
103
|
reportSuccess(context, scope, targetRoot, assetsRoot, result);
|
|
116
104
|
process.exitCode = 0;
|
|
117
105
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/init/tools/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EAEnB,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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/init/tools/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EAEnB,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;AASzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC7B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,uBAA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EACvB,YAAY,EAAE,qBAAqB,GAClC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAqerB;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,CAmET"}
|
|
@@ -7,7 +7,8 @@ import { addLocalPaths } from '../../local/manage.js';
|
|
|
7
7
|
import { removeAgentsMdSection, upsertAgentsMdSection, } from '../../shared/agents-md.js';
|
|
8
8
|
import { selectManyWithAbort, selectWithAbort, } from '../../shared/shared.prompts.js';
|
|
9
9
|
import { readGlobalOptions } from '../../shared/shared.utils.js';
|
|
10
|
-
import { canonicalPathsForPacks, setInstalledCanonicalPaths, } from '../../tools/shared/install-sync-context.js';
|
|
10
|
+
import { canonicalPathsForPacks, getInstalledCanonicalPaths, setInstalledCanonicalPaths, } from '../../tools/shared/install-sync-context.js';
|
|
11
|
+
import { reconcileProjectToolsConfig } from '../../tools/shared/project-tools-config.js';
|
|
11
12
|
import { scanTools } from '../../tools/shared/scan-tools.js';
|
|
12
13
|
import { readOatConfig, resolveLocalPaths, writeOatConfig, } from '../../../config/oat-config.js';
|
|
13
14
|
import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
@@ -443,16 +444,6 @@ function buildPackEndStateChoices(pack, currentLocation, defaultEndState) {
|
|
|
443
444
|
const rest = annotated.filter((choice) => choice.value !== defaultEndState);
|
|
444
445
|
return defaultChoice ? [defaultChoice, ...rest] : annotated;
|
|
445
446
|
}
|
|
446
|
-
function buildInstalledToolsConfig(selectedPacks, installedPackStates, existingTools) {
|
|
447
|
-
const selectedPackSet = new Set(selectedPacks);
|
|
448
|
-
const tools = { ...existingTools };
|
|
449
|
-
for (const pack of ALL_TOOL_PACKS) {
|
|
450
|
-
tools[pack] =
|
|
451
|
-
selectedPackSet.has(pack) ||
|
|
452
|
-
installedPackStates[pack].location !== 'not-installed';
|
|
453
|
-
}
|
|
454
|
-
return tools;
|
|
455
|
-
}
|
|
456
447
|
function reportSuccess(context, packs, syncScopes) {
|
|
457
448
|
if (context.json) {
|
|
458
449
|
context.logger.json({
|
|
@@ -877,9 +868,6 @@ export async function runInitTools(context, dependencies) {
|
|
|
877
868
|
projectManagementSectionResult.action !== 'no-change') {
|
|
878
869
|
context.logger.info(`AGENTS.md project-management section ${projectManagementSectionResult.action}.`);
|
|
879
870
|
}
|
|
880
|
-
const config = await dependencies.readOatConfig(projectRoot);
|
|
881
|
-
const tools = buildInstalledToolsConfig(selectedPacks, initialPackStates, config.tools);
|
|
882
|
-
await dependencies.writeOatConfig(projectRoot, { ...config, tools });
|
|
883
871
|
const affectedScopesList = [...affectedScopes];
|
|
884
872
|
lastRunInitToolsMetadata = {
|
|
885
873
|
affectedScopes: affectedScopesList,
|
|
@@ -909,19 +897,52 @@ export function createInitToolsCommand(overrides = {}) {
|
|
|
909
897
|
...DEFAULT_DEPENDENCIES,
|
|
910
898
|
...overrides,
|
|
911
899
|
};
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
.
|
|
920
|
-
.
|
|
921
|
-
|
|
922
|
-
|
|
900
|
+
async function reconcileAfterInstall(actionCommand) {
|
|
901
|
+
if (process.exitCode !== undefined && process.exitCode !== 0) {
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
if (getInstalledCanonicalPaths(actionCommand).length === 0) {
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
const context = dependencies.buildCommandContext(readGlobalOptions(actionCommand));
|
|
908
|
+
const repoRoot = await dependencies.resolveProjectRoot(context.cwd);
|
|
909
|
+
await reconcileProjectToolsConfig({
|
|
910
|
+
repoRoot,
|
|
911
|
+
cwd: context.cwd,
|
|
912
|
+
home: context.home,
|
|
913
|
+
}, dependencies);
|
|
914
|
+
}
|
|
915
|
+
const packCommands = [
|
|
916
|
+
createInitToolsCoreCommand(),
|
|
917
|
+
createInitToolsIdeasCommand(),
|
|
918
|
+
createInitToolsDocsCommand(),
|
|
919
|
+
createInitToolsProjectManagementCommand(),
|
|
920
|
+
createInitToolsWorkflowsCommand(),
|
|
921
|
+
createInitToolsUtilityCommand(),
|
|
922
|
+
createInitToolsResearchCommand(),
|
|
923
|
+
createInitToolsBrainstormCommand({
|
|
924
|
+
buildCommandContext: dependencies.buildCommandContext,
|
|
925
|
+
resolveProjectRoot: dependencies.resolveProjectRoot,
|
|
926
|
+
resolveScopeRoot: dependencies.resolveScopeRoot,
|
|
927
|
+
resolveAssetsRoot: dependencies.resolveAssetsRoot,
|
|
928
|
+
installBrainstorm: dependencies.installBrainstorm,
|
|
929
|
+
scanTools: dependencies.scanTools,
|
|
930
|
+
}),
|
|
931
|
+
];
|
|
932
|
+
for (const packCommand of packCommands) {
|
|
933
|
+
packCommand.hook('postAction', async (_thisCommand, actionCommand) => {
|
|
934
|
+
await reconcileAfterInstall(actionCommand);
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
const command = new Command('tools').description('Install OAT tool packs (core, ideas, docs, workflows, utility, project-management, research, brainstorm)');
|
|
938
|
+
for (const packCommand of packCommands) {
|
|
939
|
+
command.addCommand(packCommand);
|
|
940
|
+
}
|
|
941
|
+
command.action(async (_options, command) => {
|
|
923
942
|
const context = dependencies.buildCommandContext(readGlobalOptions(command));
|
|
924
943
|
const selectedPacks = await runInitTools(context, dependencies);
|
|
925
944
|
setInstalledCanonicalPaths(command, canonicalPathsForPacks(selectedPacks));
|
|
945
|
+
await reconcileAfterInstall(command);
|
|
926
946
|
});
|
|
947
|
+
return command;
|
|
927
948
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CommandContext } from '../../../app/command-context.js';
|
|
2
|
+
import type { ScanToolsOptions } from '../../tools/shared/scan-tools.js';
|
|
3
|
+
import type { PackName, ToolInfo } from '../../tools/shared/types.js';
|
|
4
|
+
import type { ConcreteScope } from '../../../shared/types.js';
|
|
5
|
+
export declare const PACK_NAMES: readonly ["core", "ideas", "docs", "workflows", "utility", "project-management", "research", "brainstorm"];
|
|
6
|
+
export interface PackAvailability {
|
|
7
|
+
pack: PackName;
|
|
8
|
+
available: boolean;
|
|
9
|
+
scopes: ConcreteScope[];
|
|
10
|
+
}
|
|
11
|
+
export interface PackAvailabilityDependencies {
|
|
12
|
+
scanTools: (options: ScanToolsOptions) => Promise<ToolInfo[]>;
|
|
13
|
+
resolveScopeRoot: (scope: ConcreteScope, cwd: string, home: string) => Promise<string>;
|
|
14
|
+
resolveAssetsRoot: () => Promise<string>;
|
|
15
|
+
}
|
|
16
|
+
export declare function isPackName(value: string): value is PackName;
|
|
17
|
+
export declare function resolvePackAvailability(pack: PackName, scopes: ConcreteScope[], context: CommandContext, dependencies: PackAvailabilityDependencies): Promise<PackAvailability>;
|
|
18
|
+
//# sourceMappingURL=has-pack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-pack.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/has/has-pack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,eAAO,MAAM,UAAU,4GASiB,CAAC;AAEzC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9D,gBAAgB,EAAE,CAChB,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,KACT,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,iBAAiB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,QAAQ,CAE3D;AAED,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,aAAa,EAAE,EACvB,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,4BAA4B,GACzC,OAAO,CAAC,gBAAgB,CAAC,CAyB3B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export const PACK_NAMES = [
|
|
2
|
+
'core',
|
|
3
|
+
'ideas',
|
|
4
|
+
'docs',
|
|
5
|
+
'workflows',
|
|
6
|
+
'utility',
|
|
7
|
+
'project-management',
|
|
8
|
+
'research',
|
|
9
|
+
'brainstorm',
|
|
10
|
+
];
|
|
11
|
+
export function isPackName(value) {
|
|
12
|
+
return PACK_NAMES.includes(value);
|
|
13
|
+
}
|
|
14
|
+
export async function resolvePackAvailability(pack, scopes, context, dependencies) {
|
|
15
|
+
const assetsRoot = await dependencies.resolveAssetsRoot();
|
|
16
|
+
const matchingScopes = [];
|
|
17
|
+
for (const scope of scopes) {
|
|
18
|
+
const scopeRoot = await dependencies.resolveScopeRoot(scope, context.cwd, context.home);
|
|
19
|
+
const tools = await dependencies.scanTools({
|
|
20
|
+
scope,
|
|
21
|
+
scopeRoot,
|
|
22
|
+
assetsRoot,
|
|
23
|
+
});
|
|
24
|
+
if (tools.some((tool) => tool.pack === pack)) {
|
|
25
|
+
matchingScopes.push(scope);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
pack,
|
|
30
|
+
available: matchingScopes.length > 0,
|
|
31
|
+
scopes: matchingScopes,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/has/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,KAAK,4BAA4B,EAIlC,MAAM,YAAY,CAAC;AAapB,wBAAgB,qBAAqB,CACnC,YAAY,GAAE,4BAAkD,GAC/D,OAAO,CA0CT"}
|