forked from cleveragents/cleveragents-core
b8f9da4cca
Wrap `PersonaRegistry.delete()` with the personas file lock and use race-safe `unlink` handling for concurrent save/delete consistency.
40 lines
1.6 KiB
Gherkin
40 lines
1.6 KiB
Gherkin
Feature: TUI input modes
|
|
TUI prompt supports normal reference mode, slash command mode, and shell mode.
|
|
|
|
Scenario: Normal mode expands @ references
|
|
When I parse TUI references for "inspect @README.md"
|
|
Then the parsed line should include "@resource:README.md"
|
|
|
|
Scenario: Command mode dispatches slash command handler
|
|
When I route TUI input "/help"
|
|
Then the TUI mode should be "command"
|
|
And the TUI command result should be "ok:/help"
|
|
|
|
Scenario: Shell mode runs host command
|
|
When I route TUI input "!echo hello"
|
|
Then the TUI mode should be "shell"
|
|
And the TUI shell stdout should contain "hello"
|
|
|
|
Scenario: Shell mode blocks dangerous command by default
|
|
When I route TUI input "!rm -rf /"
|
|
Then the TUI mode should be "shell"
|
|
And the TUI shell stderr should contain "blocked dangerous shell command"
|
|
|
|
Scenario: Dangerous shell pattern detection helper
|
|
When I check shell danger detection for "rm -rf /tmp"
|
|
Then shell danger detection result should be "true"
|
|
When I check shell danger detection for "echo hello"
|
|
Then shell danger detection result should be "false"
|
|
|
|
Scenario: Reference catalog ignores .git and caches scans
|
|
Given a deterministic TUI reference fixture
|
|
When I parse and suggest TUI references using fixture
|
|
Then TUI walk count should be "1"
|
|
And TUI suggestions should not include ".git/secret.txt"
|
|
|
|
Scenario: TUI app fallback path reports missing textual dependency
|
|
When I check TUI app textual availability flag
|
|
Then TUI textual availability should be boolean
|
|
When I run fallback TUI app
|
|
Then fallback TUI app should fail with "Textual dependency missing."
|