Commit 0fed5fd
authored
ucode configure skills: MCP-connection mode (add/remove/replace) + status (#236)
* Add `ucode configure skills` MCP-connection mode + status section
Introduces `ucode configure skills` for managing a single Unity Catalog
Skills MCP connection (`databricks-skill-registry`) whose scope is a set
of `catalog.schema` locations, rendered as a multi-schema `?schema=` URL
(aligns with the backend route in universe #2256555).
- `build_skills_mcp_url(workspace, locations)`: repeated `?schema=`; empty
list -> bare `/ai-gateway/skills/` (utility tools only).
- Single `kind:"skills"` entry with `skill_locations` as the source of
truth; the URL is derived and never parsed back. Every run rebuilds
exactly one skills entry, preserving non-skills entries.
- `--location a.b,c.d --mcp [--remove|--replace]` adds/removes/replaces the
location set; `--remove`/`--replace` are mutually exclusive and require
`--mcp`; a soft warning fires above 10 schemas. The bare form (no
`--mcp`) registers the connection for the given schemas; download-only
affordances (`--path`, `--yes`, a 3-part `.skill` location) without
`--mcp` raise a clear "not available yet" error.
- `alwaysLoad` is set on the skills entry for the Claude client only.
- `ucode status` gains a top-level Skills section (Connection / Mode /
Locations / Configured); the skills entry is excluded from each agent's
per-client MCP-servers line.
Also extracts `_setup_mcp_clients` from `configure_mcp_command` (shared by
the mcp and skills commands) and adds an `always_load` keyword to
`build_mcp_http_entry` (default off) as behavior-preserving prep.
Co-authored-by: Isaac
* Preserve the skills connection across `configure mcp`
`configure mcp --location` (and the interactive picker) rebuilt the MCP
server list from only the mcp-services they manage, so `apply_mcp_server_changes`
treated the `kind:"skills"` entry as a removal and unregistered it from every
agent. Both paths now carry an existing skills connection through untouched
(the picker also hides it, since it is managed by `configure skills`).
Co-authored-by: Isaac
* status: trim Skills section to locations + configured agents
Drop the Connection line (fixed name, no signal) and the Mode line
(inferred; deferred until download mode lands), and rename the locations
line to `Skill MCP Locations` to distinguish it from download locations a
later PR may track separately.
Co-authored-by: Isaac
* Address review: scope skills PR to MCP mode only
Defer all download scaffolding to the later download-mode PR and apply
review cleanups:
- CLI: drop --path/--yes and 3-part `.skill` parsing; --location takes
only `<catalog>.<schema>` refs. Non---mcp invocations return a clear
"not available yet" error until download mode lands.
- Remove the bare `configure_skills_command` entry point and the
`SkillLocation` NamedTuple.
- Drop the client-side schema soft-cap; let the backend enforce limits.
- Rename `_apply_skills_connection` -> `_update_skills_mcp`; group the
skills helpers just above `configure_skills_mcp_command`.
- `resolve_skill_location_set` dedupes via `dict.fromkeys`.
- status: rename locals to `skill_mcp_entry` / `configured_agents`.
- Tighten `build_skills_mcp_url` docstring and a couple of comments.
Co-authored-by: Isaac
* Address review: drop redundant dedup, group skills helpers
- `resolve_skill_location_set` no longer de-dupes the `replace` set; the
CLI parser (`_parse_skill_locations`) already drops duplicates, so it
just returns `requested`.
- Move `_merge_clients`, `_build_skills_entry`, and
`_resolve_skills_mcp_servers` down to sit with the rest of the skills
helpers just above `configure_skills_mcp_command`.
Co-authored-by: Isaac
* skills: make --location override-only, drop --remove/--replace
Per review, keep the MCP-mode surface minimal: --location now sets the
skills connection's schema set to exactly the listed locations, replacing
any prior set, instead of add/remove/replace mutations. Removes the
--remove/--replace flags and mode dispatch, and the now-dead
resolve_skill_location_set / _current_skill_locations helpers.
Co-authored-by: Isaac
* status: add configure-skills hint to footer
Surface `ucode configure skills --location <catalog>.<schema> --mcp`
alongside the existing configure-mcp/tracing hints so users discover the
Skills connection command from `ucode status`.
Co-authored-by: Isaac1 parent 0a5225a commit 0fed5fd
6 files changed
Lines changed: 581 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
146 | 169 | | |
147 | 170 | | |
148 | 171 | | |
| |||
723 | 746 | | |
724 | 747 | | |
725 | 748 | | |
726 | | - | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
727 | 752 | | |
728 | 753 | | |
729 | 754 | | |
| |||
733 | 758 | | |
734 | 759 | | |
735 | 760 | | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
736 | 778 | | |
737 | 779 | | |
738 | 780 | | |
| |||
757 | 799 | | |
758 | 800 | | |
759 | 801 | | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
760 | 806 | | |
761 | 807 | | |
762 | 808 | | |
| |||
1349 | 1395 | | |
1350 | 1396 | | |
1351 | 1397 | | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
1352 | 1428 | | |
1353 | 1429 | | |
1354 | 1430 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1365 | 1365 | | |
1366 | 1366 | | |
1367 | 1367 | | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
1368 | 1381 | | |
1369 | 1382 | | |
1370 | 1383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
99 | | - | |
100 | | - | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
| |||
1037 | 1043 | | |
1038 | 1044 | | |
1039 | 1045 | | |
1040 | | - | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1041 | 1049 | | |
1042 | 1050 | | |
1043 | 1051 | | |
| |||
1103 | 1111 | | |
1104 | 1112 | | |
1105 | 1113 | | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
1106 | 1118 | | |
1107 | 1119 | | |
1108 | 1120 | | |
| |||
1113 | 1125 | | |
1114 | 1126 | | |
1115 | 1127 | | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
1119 | 1132 | | |
1120 | 1133 | | |
1121 | 1134 | | |
| |||
1174 | 1187 | | |
1175 | 1188 | | |
1176 | 1189 | | |
1177 | | - | |
| 1190 | + | |
1178 | 1191 | | |
1179 | 1192 | | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
1199 | 1199 | | |
1200 | 1200 | | |
1201 | 1201 | | |
| |||
1223 | 1223 | | |
1224 | 1224 | | |
1225 | 1225 | | |
1226 | | - | |
| 1226 | + | |
1227 | 1227 | | |
1228 | 1228 | | |
1229 | 1229 | | |
1230 | 1230 | | |
1231 | 1231 | | |
1232 | 1232 | | |
1233 | 1233 | | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
1234 | 1257 | | |
1235 | 1258 | | |
1236 | 1259 | | |
| |||
1276 | 1299 | | |
1277 | 1300 | | |
1278 | 1301 | | |
1279 | | - | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
1280 | 1307 | | |
1281 | 1308 | | |
1282 | 1309 | | |
1283 | 1310 | | |
1284 | | - | |
| 1311 | + | |
1285 | 1312 | | |
1286 | 1313 | | |
1287 | 1314 | | |
1288 | 1315 | | |
1289 | 1316 | | |
1290 | 1317 | | |
1291 | 1318 | | |
1292 | | - | |
| 1319 | + | |
1293 | 1320 | | |
1294 | 1321 | | |
1295 | 1322 | | |
| |||
1335 | 1362 | | |
1336 | 1363 | | |
1337 | 1364 | | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
0 commit comments