Commit 13ddb2f
committed
feat: add
Adds a new command group for working with Context Grounding (ECS) indexes
directly from the terminal — the same semantic search agents use at runtime.
Commands
--------
uipath context-grounding list --folder-path PATH
uipath context-grounding retrieve --index NAME --folder-path PATH
uipath context-grounding search QUERY --index NAME --folder-path PATH
uipath context-grounding ingest --index NAME --folder-path PATH
uipath context-grounding delete --index NAME --folder-path PATH
All commands accept --folder-path / --folder-key, --format [json|table|csv],
and -o FILE, consistent with `uipath buckets` and `uipath assets`.
search also accepts --limit (min 1, default 10) and --threshold (optional).
Service changes (uipath-platform)
----------------------------------
- Add list() / list_async() to ContextGroundingService (GET /ecs_/v2/indexes
without $filter; retrieve() uses the same endpoint with Name eq filter)
- Replace bare list[T] annotations in the service with List[T] from typing
to fix a class-scope shadowing issue: naming a method `list` causes Python
to resolve the built-in as the method when evaluating later annotations
- list and search table output projects to key columns; full objects for JSON/CSV
CLI changes (uipath)
--------------------
- Register `context-grounding` in _LAZY_COMMANDS with hyphen->underscore fix
for getattr (context-grounding -> context_grounding)
- --index named option on all commands that take an index name
- --limit (min 1, default 10) and --threshold (optional float) for search
- ingest and delete guard against index.id=None to avoid a silent SDK no-op
- ingest fast-fails via index.in_progress_ingestion() before the HTTP call
- Error handling mirrors cli_buckets.py: HTTPStatusError 404 and SDK bare
Exception route through handle_not_found_error()
- _handle_retrieve_error() typed -> NoReturn for correct control-flow inference
- All exceptions from delete_index()/ingest_data() surface as ClickException
Files
-----
packages/uipath-platform/.../context_grounding/_context_grounding_service.py
packages/uipath-platform/tests/services/test_context_grounding_service.py
packages/uipath/src/uipath/_cli/__init__.py
packages/uipath/src/uipath/_cli/services/__init__.py
packages/uipath/src/uipath/_cli/services/cli_context_grounding.py (new)
packages/uipath/tests/cli/contract/test_sdk_cli_alignment.py
packages/uipath/tests/cli/integration/test_context_grounding_commands.py (new)
Verified against alpha.uipath.com / goldenagents / DefaultTenant.uipath context-grounding CLI commands1 parent b9bcaab commit 13ddb2f
11 files changed
Lines changed: 1594 additions & 32 deletions
File tree
- packages
- uipath-platform
- src/uipath/platform/context_grounding
- tests/services
- uipath
- src/uipath/_cli
- services
- tests/cli
- contract
- integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 66 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
364 | 420 | | |
365 | 421 | | |
366 | 422 | | |
| |||
542 | 598 | | |
543 | 599 | | |
544 | 600 | | |
545 | | - | |
| 601 | + | |
546 | 602 | | |
547 | 603 | | |
548 | 604 | | |
| |||
570 | 626 | | |
571 | 627 | | |
572 | 628 | | |
573 | | - | |
| 629 | + | |
574 | 630 | | |
575 | 631 | | |
576 | 632 | | |
| |||
661 | 717 | | |
662 | 718 | | |
663 | 719 | | |
664 | | - | |
| 720 | + | |
665 | 721 | | |
666 | 722 | | |
667 | 723 | | |
| |||
737 | 793 | | |
738 | 794 | | |
739 | 795 | | |
740 | | - | |
| 796 | + | |
741 | 797 | | |
742 | 798 | | |
743 | 799 | | |
| |||
813 | 869 | | |
814 | 870 | | |
815 | 871 | | |
816 | | - | |
| 872 | + | |
817 | 873 | | |
818 | 874 | | |
819 | 875 | | |
| |||
859 | 915 | | |
860 | 916 | | |
861 | 917 | | |
862 | | - | |
| 918 | + | |
863 | 919 | | |
864 | 920 | | |
865 | 921 | | |
| |||
1741 | 1797 | | |
1742 | 1798 | | |
1743 | 1799 | | |
1744 | | - | |
| 1800 | + | |
1745 | 1801 | | |
1746 | 1802 | | |
1747 | 1803 | | |
| |||
1834 | 1890 | | |
1835 | 1891 | | |
1836 | 1892 | | |
1837 | | - | |
| 1893 | + | |
1838 | 1894 | | |
1839 | 1895 | | |
1840 | 1896 | | |
| |||
2002 | 2058 | | |
2003 | 2059 | | |
2004 | 2060 | | |
2005 | | - | |
| 2061 | + | |
2006 | 2062 | | |
2007 | 2063 | | |
2008 | 2064 | | |
| |||
2052 | 2108 | | |
2053 | 2109 | | |
2054 | 2110 | | |
2055 | | - | |
| 2111 | + | |
2056 | 2112 | | |
2057 | 2113 | | |
2058 | 2114 | | |
| |||
Lines changed: 147 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
379 | 526 | | |
380 | 527 | | |
381 | 528 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
0 commit comments