agentic-cli 0.3.0__tar.gz → 0.3.1__tar.gz
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.
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/CHANGELOG.md +13 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/PKG-INFO +22 -1
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/README.md +21 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/pyproject.toml +1 -1
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/__init__.py +1 -1
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/cli/app.py +40 -3
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/planning/task_graph.py +63 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/events.py +34 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/manager.py +2 -18
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph_manager.py +0 -2
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/.gitignore +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/LICENSE +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/environment.yml +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/examples/hello_agent.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/examples/hello_langgraph.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/examples/research_demo/README.md +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/examples/research_demo/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/examples/research_demo/__main__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/examples/research_demo/agents.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/examples/research_demo/app.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/examples/research_demo/commands.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/examples/research_demo/settings.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/examples/research_demo/tools.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/requirements-dev.txt +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/requirements.txt +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/cli/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/cli/builtin_commands.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/cli/commands.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/cli/settings.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/cli/settings_command.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/cli/settings_introspection.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/config.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/config_mixins.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/hitl/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/hitl/approval.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/hitl/checkpoints.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/hitl/config.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/knowledge_base/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/knowledge_base/embeddings.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/knowledge_base/manager.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/knowledge_base/models.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/knowledge_base/sources.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/knowledge_base/vector_store.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/logging.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/memory/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/memory/longterm.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/memory/manager.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/memory/tools.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/memory/working.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/persistence/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/persistence/artifacts.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/persistence/session.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/planning/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/resolvers.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/settings_persistence.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/tools/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/tools/executor.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/tools/file_ops.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/tools/hitl_tools.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/tools/memory_tools.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/tools/planning_tools.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/tools/registry.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/tools/shell.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/tools/standard.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/adk/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/adk_manager.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/base_manager.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/config.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/context.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/persistence/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/persistence/checkpointers.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/persistence/stores.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/state.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/tools/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/tools/file_search.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/tools/shell.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph_state.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/settings.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/thinking.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/__init__.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/conftest.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/test_commands.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/test_config.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/test_hitl.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/test_knowledge_base.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/test_langgraph.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/test_memory.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/test_persistence.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/test_planning.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/test_tools.py +0 -0
- {agentic_cli-0.3.0 → agentic_cli-0.3.1}/tests/test_workflow.py +0 -0
|
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.1] - 2026-01-28
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Task Progress Display**: Thinking box now shows dynamic task progress with status icons (◐ ☐ ✓ ✗)
|
|
13
|
+
- `TASK_PROGRESS` event type for signaling task graph updates
|
|
14
|
+
- `TaskGraph.to_compact_display()` for condensed status display
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **Background Initialization**: Workflow manager now initializes services in background, eliminating first-message lag
|
|
19
|
+
- Simplified LangGraph imports - removed `_import_langgraph` helper in favor of direct imports
|
|
20
|
+
|
|
8
21
|
## [0.3.0] - 2025-01-27
|
|
9
22
|
|
|
10
23
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentic-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: A framework for building domain-specific agentic CLI applications
|
|
5
5
|
Project-URL: Homepage, https://github.com/shoom1/agentic-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/shoom1/agentic-cli
|
|
@@ -60,6 +60,8 @@ Agentic CLI provides the core infrastructure for building interactive CLI applic
|
|
|
60
60
|
│ - Terminal UI (thinking-prompt) │
|
|
61
61
|
│ - Command registry (/help, /status, /clear, etc.) │
|
|
62
62
|
│ - Message history │
|
|
63
|
+
│ - Background initialization (no first-message lag) │
|
|
64
|
+
│ - Task progress display in thinking box │
|
|
63
65
|
└─────────────────────────────────────────────────────────────────────┘
|
|
64
66
|
│
|
|
65
67
|
▼
|
|
@@ -430,6 +432,7 @@ WorkflowEvent types for UI integration:
|
|
|
430
432
|
| `CODE_EXECUTION` | Code execution result | outcome |
|
|
431
433
|
| `ERROR` | Error message | recoverable, error_code |
|
|
432
434
|
| `USER_INPUT_REQUIRED` | Tool needs user input | request_id, prompt |
|
|
435
|
+
| `TASK_PROGRESS` | Task graph update | current_task_description, progress |
|
|
433
436
|
|
|
434
437
|
### Processing Events
|
|
435
438
|
|
|
@@ -445,6 +448,24 @@ async for event in manager.process(message, user_id="user1"):
|
|
|
445
448
|
print(f"Result: {event.metadata['result']}")
|
|
446
449
|
```
|
|
447
450
|
|
|
451
|
+
### Task Progress Display
|
|
452
|
+
|
|
453
|
+
When using a task graph for planning, the CLI thinking box dynamically shows task progress:
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
Calling: search_web
|
|
457
|
+
─── Tasks: 2/5 ───
|
|
458
|
+
◐ Researching topic
|
|
459
|
+
☐ Analyzing results
|
|
460
|
+
☐ Writing summary
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
Status icons:
|
|
464
|
+
- `◐` In progress
|
|
465
|
+
- `☐` Pending
|
|
466
|
+
- `✓` Completed
|
|
467
|
+
- `✗` Failed
|
|
468
|
+
|
|
448
469
|
## Examples
|
|
449
470
|
|
|
450
471
|
See the `examples/` directory for complete working examples:
|
|
@@ -21,6 +21,8 @@ Agentic CLI provides the core infrastructure for building interactive CLI applic
|
|
|
21
21
|
│ - Terminal UI (thinking-prompt) │
|
|
22
22
|
│ - Command registry (/help, /status, /clear, etc.) │
|
|
23
23
|
│ - Message history │
|
|
24
|
+
│ - Background initialization (no first-message lag) │
|
|
25
|
+
│ - Task progress display in thinking box │
|
|
24
26
|
└─────────────────────────────────────────────────────────────────────┘
|
|
25
27
|
│
|
|
26
28
|
▼
|
|
@@ -391,6 +393,7 @@ WorkflowEvent types for UI integration:
|
|
|
391
393
|
| `CODE_EXECUTION` | Code execution result | outcome |
|
|
392
394
|
| `ERROR` | Error message | recoverable, error_code |
|
|
393
395
|
| `USER_INPUT_REQUIRED` | Tool needs user input | request_id, prompt |
|
|
396
|
+
| `TASK_PROGRESS` | Task graph update | current_task_description, progress |
|
|
394
397
|
|
|
395
398
|
### Processing Events
|
|
396
399
|
|
|
@@ -406,6 +409,24 @@ async for event in manager.process(message, user_id="user1"):
|
|
|
406
409
|
print(f"Result: {event.metadata['result']}")
|
|
407
410
|
```
|
|
408
411
|
|
|
412
|
+
### Task Progress Display
|
|
413
|
+
|
|
414
|
+
When using a task graph for planning, the CLI thinking box dynamically shows task progress:
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
Calling: search_web
|
|
418
|
+
─── Tasks: 2/5 ───
|
|
419
|
+
◐ Researching topic
|
|
420
|
+
☐ Analyzing results
|
|
421
|
+
☐ Writing summary
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
Status icons:
|
|
425
|
+
- `◐` In progress
|
|
426
|
+
- `☐` Pending
|
|
427
|
+
- `✓` Completed
|
|
428
|
+
- `✗` Failed
|
|
429
|
+
|
|
409
430
|
## Examples
|
|
410
431
|
|
|
411
432
|
See the `examples/` directory for complete working examples:
|
|
@@ -513,7 +513,12 @@ class BaseCLIApp:
|
|
|
513
513
|
self.command_registry.register(SettingsCommand())
|
|
514
514
|
|
|
515
515
|
async def _background_init(self) -> None:
|
|
516
|
-
"""Initialize workflow manager in background
|
|
516
|
+
"""Initialize workflow manager in background.
|
|
517
|
+
|
|
518
|
+
Creates the workflow manager and calls initialize_services() to
|
|
519
|
+
preload LLM, build graph, and set up checkpointing. This avoids
|
|
520
|
+
lag on the first user message.
|
|
521
|
+
"""
|
|
517
522
|
loop = asyncio.get_running_loop()
|
|
518
523
|
|
|
519
524
|
def _create_workflow() -> "BaseWorkflowManager":
|
|
@@ -521,10 +526,16 @@ class BaseCLIApp:
|
|
|
521
526
|
|
|
522
527
|
try:
|
|
523
528
|
logger.debug("background_init_starting")
|
|
529
|
+
|
|
530
|
+
# Step 1: Create workflow manager (sync, in thread pool)
|
|
524
531
|
self._workflow = await loop.run_in_executor(
|
|
525
532
|
_init_executor, _create_workflow
|
|
526
533
|
)
|
|
527
534
|
|
|
535
|
+
# Step 2: Initialize services (async - builds graph, loads LLM, etc.)
|
|
536
|
+
# This is the expensive part that was previously deferred to first message
|
|
537
|
+
await self._workflow.initialize_services()
|
|
538
|
+
|
|
528
539
|
# Update status bar to show ready
|
|
529
540
|
model = self._workflow.model
|
|
530
541
|
self.session.status_text = f"{model} | Ctrl+C: cancel | /help: commands"
|
|
@@ -674,7 +685,7 @@ class BaseCLIApp:
|
|
|
674
685
|
if self._settings.log_activity:
|
|
675
686
|
self.message_history.add(message, MessageType.USER)
|
|
676
687
|
|
|
677
|
-
# Status line for thinking box (
|
|
688
|
+
# Status line for thinking box (multi-line with task progress)
|
|
678
689
|
status_line = "Processing..."
|
|
679
690
|
thinking_started = False
|
|
680
691
|
|
|
@@ -683,7 +694,26 @@ class BaseCLIApp:
|
|
|
683
694
|
response_content: list[str] = []
|
|
684
695
|
|
|
685
696
|
def get_status() -> str:
|
|
686
|
-
|
|
697
|
+
"""Build status display with current action and task progress."""
|
|
698
|
+
lines = [status_line]
|
|
699
|
+
|
|
700
|
+
# Add task progress if task graph exists and has tasks
|
|
701
|
+
task_graph = getattr(self.workflow, "task_graph", None)
|
|
702
|
+
if task_graph is not None:
|
|
703
|
+
progress = task_graph.get_progress()
|
|
704
|
+
if progress["total"] > 0:
|
|
705
|
+
# Add separator and progress bar
|
|
706
|
+
completed = progress["completed"]
|
|
707
|
+
total = progress["total"]
|
|
708
|
+
in_progress = progress["in_progress"]
|
|
709
|
+
lines.append(f"─── Tasks: {completed}/{total} ───")
|
|
710
|
+
|
|
711
|
+
# Add compact task list
|
|
712
|
+
compact_display = task_graph.to_compact_display(max_tasks=5)
|
|
713
|
+
if compact_display:
|
|
714
|
+
lines.append(compact_display)
|
|
715
|
+
|
|
716
|
+
return "\n".join(lines)
|
|
687
717
|
|
|
688
718
|
try:
|
|
689
719
|
self.session.start_thinking(get_status)
|
|
@@ -758,6 +788,13 @@ class BaseCLIApp:
|
|
|
758
788
|
# Update status with file info
|
|
759
789
|
status_line = f"File: {event.content}"
|
|
760
790
|
|
|
791
|
+
elif event.type == EventType.TASK_PROGRESS:
|
|
792
|
+
# Task progress update - status is rebuilt dynamically by get_status()
|
|
793
|
+
# Just update the status line with current task info if available
|
|
794
|
+
current_task = event.metadata.get("current_task_description")
|
|
795
|
+
if current_task:
|
|
796
|
+
status_line = f"Working on: {current_task}"
|
|
797
|
+
|
|
761
798
|
# Finish thinking box (don't add status to history)
|
|
762
799
|
if thinking_started:
|
|
763
800
|
self.session.finish_thinking(add_to_history=False)
|
|
@@ -314,6 +314,69 @@ class TaskGraph:
|
|
|
314
314
|
|
|
315
315
|
return "\n".join(lines)
|
|
316
316
|
|
|
317
|
+
def to_compact_display(self, max_tasks: int = 5, max_desc_len: int = 30) -> str:
|
|
318
|
+
"""Generate a compact display suitable for the thinking box status line.
|
|
319
|
+
|
|
320
|
+
Shows task progress in a condensed format with truncated descriptions.
|
|
321
|
+
Prioritizes showing in-progress tasks, then pending tasks.
|
|
322
|
+
|
|
323
|
+
Args:
|
|
324
|
+
max_tasks: Maximum number of tasks to display
|
|
325
|
+
max_desc_len: Maximum length for task descriptions
|
|
326
|
+
|
|
327
|
+
Returns:
|
|
328
|
+
A compact string representation with status icons.
|
|
329
|
+
"""
|
|
330
|
+
if not self._tasks:
|
|
331
|
+
return ""
|
|
332
|
+
|
|
333
|
+
lines = []
|
|
334
|
+
|
|
335
|
+
# Find root tasks (no parent), sorted by status priority
|
|
336
|
+
root_tasks = [t for t in self._tasks.values() if t.parent is None]
|
|
337
|
+
|
|
338
|
+
# Sort: in_progress first, then pending, then others
|
|
339
|
+
status_order = {
|
|
340
|
+
TaskStatus.IN_PROGRESS: 0,
|
|
341
|
+
TaskStatus.PENDING: 1,
|
|
342
|
+
TaskStatus.BLOCKED: 2,
|
|
343
|
+
TaskStatus.COMPLETED: 3,
|
|
344
|
+
TaskStatus.FAILED: 4,
|
|
345
|
+
TaskStatus.SKIPPED: 5,
|
|
346
|
+
}
|
|
347
|
+
root_tasks.sort(key=lambda t: status_order.get(t.status, 99))
|
|
348
|
+
|
|
349
|
+
def format_task_compact(task: Task, indent: int = 0) -> None:
|
|
350
|
+
if len(lines) >= max_tasks:
|
|
351
|
+
return
|
|
352
|
+
icon = STATUS_ICONS.get(task.status, "?")
|
|
353
|
+
prefix = " " * indent
|
|
354
|
+
desc = task.description
|
|
355
|
+
if len(desc) > max_desc_len:
|
|
356
|
+
desc = desc[: max_desc_len - 1] + "…"
|
|
357
|
+
lines.append(f"{prefix}{icon} {desc}")
|
|
358
|
+
|
|
359
|
+
# Format subtasks (limited)
|
|
360
|
+
for subtask_id in task.subtasks:
|
|
361
|
+
if len(lines) >= max_tasks:
|
|
362
|
+
break
|
|
363
|
+
subtask = self._tasks.get(subtask_id)
|
|
364
|
+
if subtask:
|
|
365
|
+
format_task_compact(subtask, indent + 1)
|
|
366
|
+
|
|
367
|
+
for task in root_tasks:
|
|
368
|
+
if len(lines) >= max_tasks:
|
|
369
|
+
break
|
|
370
|
+
format_task_compact(task)
|
|
371
|
+
|
|
372
|
+
# Add overflow indicator if needed
|
|
373
|
+
total = len(self._tasks)
|
|
374
|
+
if total > max_tasks:
|
|
375
|
+
remaining = total - len(lines)
|
|
376
|
+
lines.append(f" ... +{remaining} more")
|
|
377
|
+
|
|
378
|
+
return "\n".join(lines)
|
|
379
|
+
|
|
317
380
|
def revise(self, changes: list[dict[str, Any]]) -> None:
|
|
318
381
|
"""Apply a list of changes to the task graph.
|
|
319
382
|
|
|
@@ -41,6 +41,7 @@ class EventType(Enum):
|
|
|
41
41
|
FILE_DATA = "file_data"
|
|
42
42
|
ERROR = "error"
|
|
43
43
|
USER_INPUT_REQUIRED = "user_input_required"
|
|
44
|
+
TASK_PROGRESS = "task_progress"
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
@dataclass
|
|
@@ -251,3 +252,36 @@ class WorkflowEvent:
|
|
|
251
252
|
content=prompt,
|
|
252
253
|
metadata=metadata,
|
|
253
254
|
)
|
|
255
|
+
|
|
256
|
+
@classmethod
|
|
257
|
+
def task_progress(
|
|
258
|
+
cls,
|
|
259
|
+
display: str,
|
|
260
|
+
progress: dict[str, int],
|
|
261
|
+
current_task_id: str | None = None,
|
|
262
|
+
current_task_description: str | None = None,
|
|
263
|
+
) -> "WorkflowEvent":
|
|
264
|
+
"""Create a task progress event for updating the thinking box.
|
|
265
|
+
|
|
266
|
+
This event signals that the task graph has been updated and the UI
|
|
267
|
+
should refresh its display of task progress.
|
|
268
|
+
|
|
269
|
+
Args:
|
|
270
|
+
display: Formatted string representation of the task graph
|
|
271
|
+
progress: Progress statistics (total, pending, completed, etc.)
|
|
272
|
+
current_task_id: ID of the task currently being worked on
|
|
273
|
+
current_task_description: Description of the current task
|
|
274
|
+
"""
|
|
275
|
+
metadata: dict[str, Any] = {
|
|
276
|
+
"progress": progress,
|
|
277
|
+
}
|
|
278
|
+
if current_task_id is not None:
|
|
279
|
+
metadata["current_task_id"] = current_task_id
|
|
280
|
+
if current_task_description is not None:
|
|
281
|
+
metadata["current_task_description"] = current_task_description
|
|
282
|
+
|
|
283
|
+
return cls(
|
|
284
|
+
type=EventType.TASK_PROGRESS,
|
|
285
|
+
content=display,
|
|
286
|
+
metadata=metadata,
|
|
287
|
+
)
|
|
@@ -33,22 +33,6 @@ if TYPE_CHECKING:
|
|
|
33
33
|
logger = Loggers.workflow()
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
# Lazy imports for LangGraph dependencies
|
|
37
|
-
def _import_langgraph():
|
|
38
|
-
"""Lazily import LangGraph dependencies."""
|
|
39
|
-
try:
|
|
40
|
-
from langgraph.graph import StateGraph, END
|
|
41
|
-
from langgraph.checkpoint.memory import MemorySaver
|
|
42
|
-
from langgraph.types import RetryPolicy
|
|
43
|
-
|
|
44
|
-
return StateGraph, END, MemorySaver, RetryPolicy
|
|
45
|
-
except ImportError as e:
|
|
46
|
-
raise ImportError(
|
|
47
|
-
"LangGraph dependencies not installed. "
|
|
48
|
-
"Install with: pip install agentic-cli[langgraph]"
|
|
49
|
-
) from e
|
|
50
|
-
|
|
51
|
-
|
|
52
36
|
class LangGraphWorkflowManager(BaseWorkflowManager):
|
|
53
37
|
"""LangGraph-based workflow manager for agentic applications.
|
|
54
38
|
|
|
@@ -305,7 +289,7 @@ class LangGraphWorkflowManager(BaseWorkflowManager):
|
|
|
305
289
|
Returns:
|
|
306
290
|
RetryPolicy configured with settings values for retry behavior.
|
|
307
291
|
"""
|
|
308
|
-
|
|
292
|
+
from langgraph.types import RetryPolicy
|
|
309
293
|
|
|
310
294
|
return RetryPolicy(
|
|
311
295
|
max_attempts=self._settings.retry_max_attempts,
|
|
@@ -319,7 +303,7 @@ class LangGraphWorkflowManager(BaseWorkflowManager):
|
|
|
319
303
|
Creates a graph where each agent config becomes a node,
|
|
320
304
|
with edges based on sub_agent relationships.
|
|
321
305
|
"""
|
|
322
|
-
StateGraph, END
|
|
306
|
+
from langgraph.graph import StateGraph, END
|
|
323
307
|
from agentic_cli.workflow.langgraph.state import AgentState
|
|
324
308
|
|
|
325
309
|
# Build config map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/persistence/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/persistence/stores.py
RENAMED
|
File without changes
|
|
File without changes
|
{agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/tools/__init__.py
RENAMED
|
File without changes
|
{agentic_cli-0.3.0 → agentic_cli-0.3.1}/src/agentic_cli/workflow/langgraph/tools/file_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|