Commit 35a01ea
authored
Remove target mcp jsons (#267)
* Remove add/remove target commands and mcp.json creation
- Remove 'add target' and 'remove target' CLI commands and TUI flows
- Stop creating mcp.json and mcp-defs.json during 'agentcore create'
- Keep aws-targets.json for deploy flow auto-creation of 'default' target
- Keep ConfigIO MCP methods for hidden gateway/mcp-tool features
- Update tests to remove target-dependent test cases (now uses AWS credential chain)
- Refactor useRemoveFlow to use ConfigIO.configExists instead of existsSync
Files deleted:
- src/cli/commands/add/target-action.ts
- src/cli/commands/add/__tests__/add-target.test.ts
- src/cli/tui/screens/add/AddTargetScreen.tsx
- src/cli/tui/screens/add/useAddTarget.ts
- src/cli/tui/screens/remove/RemoveTargetScreen.tsx
- src/cli/operations/remove/remove-target.ts
* Fix tests after rebase - update for removed target commands
- Update deploy-teardown.test.ts to write aws-targets.json directly
- Update remove-all.test.ts to not use add target
- Update remove-note.test.ts to test agent removal instead of target
- Delete obsolete destroy.test.ts (destroy command was removed upstream)
- Fix useRemoveFlow.ts findStack call to match new signature
* Improve UX for removed target commands
- Add error message for invalid subcommands (e.g. 'agentcore add target')
- Launch TUI when running 'agentcore remove' without subcommand
- Restore UX note for remove all command
- Exit with code 1 for invalid subcommand errors
* Address PR feedback
- Restore 'All schemas will be reset' message in useRemoveFlow
- Restore corrupted project fallback handling
- Restore aws-targets.json preservation test in remove-all
- Restore source code note test in remove-all
- Fix deploy test to check specific 'no agents' error
- Remove 'target' from remove-logger ResourceType
- Add comments about catch-all argument registration order1 parent b6f2d83 commit 35a01ea
30 files changed
Lines changed: 152 additions & 1337 deletions
File tree
- src/cli
- commands
- add
- __tests__
- create
- deploy/__tests__
- invoke/__tests__
- remove
- __tests__
- validate
- logging
- operations/remove
- tui
- hooks
- screens
- add
- create
- remove
- status
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 23 | | |
62 | 24 | | |
63 | 25 | | |
| |||
225 | 187 | | |
226 | 188 | | |
227 | 189 | | |
228 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
229 | 199 | | |
230 | 200 | | |
231 | 201 | | |
| |||
237 | 207 | | |
238 | 208 | | |
239 | 209 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
255 | 213 | | |
256 | 214 | | |
257 | 215 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 2 | + | |
11 | 3 | | |
12 | 4 | | |
13 | 5 | | |
| |||
36 | 28 | | |
37 | 29 | | |
38 | 30 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 31 | | |
48 | 32 | | |
49 | 33 | | |
| |||
91 | 75 | | |
92 | 76 | | |
93 | 77 | | |
94 | | - | |
95 | | - | |
96 | 78 | | |
97 | 79 | | |
98 | 80 | | |
| |||
Lines changed: 15 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 35 | | |
45 | 36 | | |
46 | 37 | | |
47 | 38 | | |
48 | 39 | | |
49 | 40 | | |
50 | 41 | | |
51 | | - | |
52 | | - | |
| 42 | + | |
| 43 | + | |
53 | 44 | | |
54 | 45 | | |
55 | 46 | | |
56 | | - | |
57 | 47 | | |
58 | 48 | | |
59 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
| 63 | + | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
71 | | - | |
| 70 | + | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | | - | |
| 85 | + | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
| |||
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | | - | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
0 commit comments