Skip to content

Commit d9130c2

Browse files
committed
Release RelayX v0.5.4 usability upgrade
1 parent 293fb9b commit d9130c2

20 files changed

Lines changed: 1232 additions & 75 deletions

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ relayx simulate-fixes Simulate remediation impact on relay paths
246246
relayx quality-gate Run local CI and release quality gates
247247
relayx schema List or validate schema and evidence contracts
248248
relayx opsec List or inspect OPSEC policies
249+
relayx discover Search commands and topics by task or keyword
250+
relayx next Suggest next useful commands from current context
249251
relayx modules List execution module manifests
250252
relayx module-plan Evaluate execution modules for one path
251253
relayx run Run the guarded execution state machine
@@ -283,6 +285,24 @@ Human-readable help and command output display a RelayX banner with the current
283285
version. Use `--no-banner` for compact terminal output. JSON, CSV, HTML,
284286
Markdown, Mermaid, and enterprise export payloads are kept machine-clean.
285287

288+
## Discovery And Next Steps
289+
290+
Use `discover` when you know the task but not the command, and `next` when you
291+
have a RelayX result and want concrete follow-up commands.
292+
293+
```bash
294+
relayx discover epa
295+
relayx discover jsonl
296+
relayx discover route --group Route/Pivot
297+
relayx next
298+
relayx next --result result.json
299+
relayx next --result result.json --path-id PX-0001
300+
```
301+
302+
`discover` searches command names, groups, examples, output contracts, help
303+
topics, and safety notes. `next` is read-only: it does not validate, execute,
304+
probe, export, or modify files unless you run one of the suggested commands.
305+
286306
## Short Options
287307

288308
Most high-use options have short aliases. Long options remain the clearest form
@@ -310,14 +330,25 @@ workflows.
310330

311331
```bash
312332
relayx console --result result.json --path-id PX-0001 --opsec-policy strict
333+
relayx console --history-file ~/.relayx/history
334+
relayx console --no-history --no-completion
313335
relayx completion zsh > relayx.zsh
336+
relayx discover epa
337+
relayx next --result result.json
314338
relayx help getting-started
315339
relayx --no-color help run
316340
```
317341

318342
Inside the console, use commands such as `use result <file>`, `use path
319343
PX-0001`, `set opsec-policy strict`, `show summary`, `show paths`, `explain`,
320-
`validate`, `run`, `export`, `bundle`, `help`, `back`, and `exit`.
344+
`validate`, `run`, `export`, `bundle`, `discover`, `next`, `menu`, `help`, `?`,
345+
`clear`, `cls`, `history`, `back`, and `exit`.
346+
347+
Interactive console sessions support readline line editing, Up/Down history,
348+
Tab completion, persistent history, and clear-screen commands. Use
349+
`--no-history`, `RELAYX_NO_HISTORY=1`, or a leading space before a command when
350+
history should not be recorded; use `--no-completion` to disable console Tab
351+
completion.
321352

322353
## Output Formats
323354

docs/CLI.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,36 @@ Next steps
7171
- Controlled Execution: `modules`, `module-plan`, `run`
7272
- Enterprise: `profiles`, `report`, `export`, `bundle`, `diff`,
7373
`simulate-fixes`
74-
- Admin: `help`, `completion`, `console`, `opsec`, `schema`, `quality-gate`
74+
- Admin: `help`, `discover`, `next`, `completion`, `console`, `opsec`,
75+
`schema`, `quality-gate`
76+
77+
## Command Discovery And Next Steps
78+
79+
`relayx discover` searches the CommandSpec registry, examples, output
80+
contracts, help topics, and safety notes. Use it when you know the task but do
81+
not remember the command.
82+
83+
```bash
84+
relayx discover epa
85+
relayx discover jsonl
86+
relayx discover route --group Route/Pivot
87+
relayx discover execution --format json
88+
```
89+
90+
`relayx next` suggests concrete follow-up commands. With no result, it prints a
91+
first-run path. With a result, it summarizes top paths and suggests review,
92+
evidence, route, validation, execution-planning, and enterprise handoff
93+
commands. With `--path-id`, it focuses the guidance on that path.
94+
95+
```bash
96+
relayx next
97+
relayx next --result examples/tutorial/sample-result.json
98+
relayx next --result examples/tutorial/sample-result.json --path-id PX-0001
99+
relayx next -r examples/tutorial/sample-result.json -p PX-0001 -f json
100+
```
101+
102+
`next` is read-only. It does not perform validation, execution, probing, export,
103+
or file modification.
75104

76105
## Operator Console
77106

@@ -84,9 +113,24 @@ and guardrails as scripted workflows.
84113
relayx console
85114
relayx console --result examples/tutorial/sample-result.json --path-id PX-0001 --opsec-policy strict
86115
relayx console --script console.txt
116+
relayx console --history-file ~/.relayx/history
117+
relayx console --no-history --no-completion
87118
relayx --no-color console --result examples/tutorial/sample-result.json
88119
```
89120

121+
Interactive sessions use the terminal readline backend when available. That
122+
enables Up/Down command history navigation, incremental line editing, Tab completion
123+
for console commands, help topics, `show` targets, OPSEC policies, and
124+
result-file paths, plus Ctrl-L clear-screen behavior on terminals that support
125+
it. RelayX also provides explicit `clear` and `cls` commands.
126+
127+
History is persisted to `RELAYX_HISTORY_FILE`, or `~/.relayx/history` by
128+
default. Use `--history-file` to choose a different file, `--no-history` or
129+
`RELAYX_NO_HISTORY=1` to disable history, and prefix a command with a leading
130+
space to keep that command out of persistent history. Commands containing
131+
obvious secret-bearing flags such as `--password` or `--token` are not saved.
132+
Script mode keeps deterministic text behavior and does not use readline.
133+
90134
The prompt reflects context:
91135

92136
```text
@@ -108,13 +152,20 @@ show paths Run paths with the selected result
108152
show matrix Run matrix with the selected result
109153
show sources Run sources with the selected result
110154
explain [query] Explain a query or the selected path
155+
menu Show grouped console commands and tips
156+
next Suggest next commands from selected result/path
157+
discover <keyword> Search commands and topics from the console
111158
validate [args...] Run validate with context-filled result/path/policy
112159
run [args...] Run controlled execution with context-filled inputs
113160
export [args...] Run export with context-filled result
114161
bundle [args...] Run bundle with context-filled result
115162
help [topic] Render curated RelayX help
163+
? Alias for help
164+
clear / cls Clear the interactive terminal
165+
history [limit] Show recent commands from the current session
166+
history clear Clear in-memory and persisted console history
116167
back Clear path first, then result
117-
exit Leave the console
168+
exit / quit Leave the console
118169
```
119170

120171
Console shortcuts call the same CLI handlers and preserve the same guardrails.

docs/README.zh-CN.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ relayx simulate-fixes 模拟修复对 relay path 的影响
230230
relayx quality-gate 运行本地 CI 和 release quality gate
231231
relayx schema 列出或验证 schema 和 evidence contract
232232
relayx opsec 列出或查看 OPSEC policy
233+
relayx discover 按任务或关键词搜索命令和 topic
234+
relayx next 根据当前 result/path 推荐下一步命令
233235
relayx modules 列出 execution module manifest
234236
relayx module-plan 评估 execution module 是否适用于某条 path
235237
relayx run 运行受控 execution state machine
@@ -267,6 +269,24 @@ relayx --no-banner help
267269
`--no-banner`。JSON、CSV、HTML、Markdown、Mermaid 和企业 export payload 会保持
268270
机器可读,不插入 banner。
269271

272+
## 发现命令与下一步
273+
274+
知道任务但不记得命令时,用 `discover`;已有 RelayX result 后,用 `next` 获取
275+
具体下一步命令。
276+
277+
```bash
278+
relayx discover epa
279+
relayx discover jsonl
280+
relayx discover route --group Route/Pivot
281+
relayx next
282+
relayx next --result result.json
283+
relayx next --result result.json --path-id PX-0001
284+
```
285+
286+
`discover` 会搜索 command name、group、example、output contract、help topic 和
287+
safety note。`next` 是只读引导:它不会执行 validation、execution、probe、export,
288+
也不会修改文件;只有你手动运行建议命令时才会进入对应 workflow。
289+
270290
## 短选项
271291

272292
高频参数提供短选项。共享 runbook 和脚本中,长选项通常更清晰;交互式操作时,
@@ -292,14 +312,23 @@ OPSEC policy 和 scope 上重复分析。它会在 prompt 中显示当前上下
292312

293313
```bash
294314
relayx console --result result.json --path-id PX-0001 --opsec-policy strict
315+
relayx console --history-file ~/.relayx/history
316+
relayx console --no-history --no-completion
295317
relayx completion zsh > relayx.zsh
318+
relayx discover epa
319+
relayx next --result result.json
296320
relayx help getting-started
297321
relayx --no-color help run
298322
```
299323

300324
console 内可使用 `use result <file>``use path PX-0001`、`set opsec-policy
301325
strict``show summary``show paths``explain``validate``run``export`、
302-
`bundle``help``back``exit`
326+
`bundle``discover``next``menu``help``?``clear``cls``history`
327+
`back``exit`
328+
329+
交互式 console 支持 readline 行编辑、上下键历史、Tab 补全、持久化历史和
330+
清屏命令。敏感终端可使用 `--no-history``RELAYX_NO_HISTORY=1`,或在命令前
331+
加一个空格避免写入历史;需要关闭 console Tab 补全时使用 `--no-completion`
303332

304333
## 输出格式
305334

docs/TUTORIAL.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,25 @@ From the repository root:
5151
relayx -V
5252
relayx -q help workflows
5353
relayx -q help getting-started
54+
relayx discover epa
5455
relayx -q quality-gate -C .
5556
```
5657

58+
When you know the task but not the exact command, use discovery:
59+
60+
```bash
61+
relayx discover epa
62+
relayx discover jsonl
63+
relayx discover route --group Route/Pivot
64+
```
65+
66+
Once you have a result file, `next` gives concrete follow-up commands:
67+
68+
```bash
69+
relayx next --result examples/tutorial/sample-result.json
70+
relayx next --result examples/tutorial/sample-result.json --path-id PX-0001
71+
```
72+
5773
Optional shell completion can make longer RelayX commands easier to use during
5874
runbook development:
5975

@@ -80,20 +96,33 @@ workflows.
8096
```bash
8197
relayx -q console --result examples/tutorial/sample-result.json --path-id PX-0001 --opsec-policy strict
8298
relayx --no-color -q console --result examples/tutorial/sample-result.json
99+
relayx -q console --history-file ~/.relayx/history
100+
relayx -q console --no-history --no-completion
83101
```
84102

85103
Example console commands:
86104

87105
```text
88106
context
107+
menu
108+
next
109+
discover jsonl
89110
show summary
90111
show paths
91112
explain
113+
clear
114+
history
92115
validate --mode dry-run
93116
run --mode dry-run
94117
exit
95118
```
96119

120+
In an interactive terminal, RelayX uses readline for line editing, Up/Down
121+
history navigation, Tab completion, and Ctrl-L clear-screen behavior when the
122+
terminal backend supports it. Use `clear` or `cls` when you want an explicit
123+
console command. Use `--no-history`, `RELAYX_NO_HISTORY=1`, or a leading space
124+
before a command when the command should not be persisted.
125+
97126
## 1. Inspect The Result
98127

99128
Start with a compact summary:

docs/TUTORIAL.zh-CN.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,25 @@ route metadata、修复控制、enterprise output 和受控执行审计记录。
4747
relayx -V
4848
relayx -q help workflows
4949
relayx -q help getting-started
50+
relayx discover epa
5051
relayx -q quality-gate -C .
5152
```
5253

54+
知道任务但不确定命令时,用 discovery:
55+
56+
```bash
57+
relayx discover epa
58+
relayx discover jsonl
59+
relayx discover route --group Route/Pivot
60+
```
61+
62+
拿到 result file 后,用 `next` 获取具体下一步命令:
63+
64+
```bash
65+
relayx next --result examples/tutorial/sample-result.json
66+
relayx next --result examples/tutorial/sample-result.json --path-id PX-0001
67+
```
68+
5369
可选 shell completion:
5470

5571
```bash
@@ -75,20 +91,32 @@ CLI handler。默认 human-readable help 和 console 输出会使用 ANSI 分色
7591
```bash
7692
relayx -q console --result examples/tutorial/sample-result.json --path-id PX-0001 --opsec-policy strict
7793
relayx --no-color -q console --result examples/tutorial/sample-result.json
94+
relayx -q console --history-file ~/.relayx/history
95+
relayx -q console --no-history --no-completion
7896
```
7997

8098
console 示例命令:
8199

82100
```text
83101
context
102+
menu
103+
next
104+
discover jsonl
84105
show summary
85106
show paths
86107
explain
108+
clear
109+
history
87110
validate --mode dry-run
88111
run --mode dry-run
89112
exit
90113
```
91114

115+
在交互式终端中,RelayX 会通过 readline 提供行编辑、上下键历史、Tab 补全,
116+
以及终端后端支持时的 Ctrl-L 清屏。需要显式命令时可以使用 `clear``cls`
117+
敏感场景可使用 `--no-history``RELAYX_NO_HISTORY=1`,或在命令前加一个空格
118+
避免写入持久化历史。
119+
92120
## 1. 查看 Result
93121

94122
先看摘要:

fixtures/enterprise_output_matrix.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
"docs/INSTALL.md"
211211
],
212212
"release": {
213-
"version": "0.1.16",
213+
"version": "0.5.4",
214214
"console_script": "relayx",
215215
"pipx_installable": true
216216
},

fixtures/execution_modules/lab_only_target_relay_fixture.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"key": "lab_only_target_relay_fixture",
33
"label": "Lab-only target relay adapter fixture",
4-
"version": "0.1.16-fixture",
4+
"version": "0.5.4-fixture",
55
"supported": false,
66
"lab_only": true,
77
"description": "Fixture manifest for a future live target relay adapter contract. It is intentionally not registered or supported.",

fixtures/execution_modules/ntlmrelayx_compat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"key": "ntlmrelayx_compat",
33
"label": "ntlmrelayx-inspired compatibility boundary",
4-
"version": "0.1.16-fixture",
4+
"version": "0.5.4-fixture",
55
"supported": false,
66
"lab_only": true,
77
"description": "Fixture manifest for a future Impacket-style adapter boundary.",

fixtures/execution_modules/relayx_audit_record.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"key": "relayx_audit_record",
33
"label": "RelayX offline audit record adapter",
4-
"version": "0.1.16-fixture",
4+
"version": "0.5.4-fixture",
55
"supported": true,
66
"lab_only": false,
77
"description": "Fixture manifest for the safe offline adapter. It records execution evidence only.",

fixtures/lab_corpus/adcs_web_enrollment_epa_matrix.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"metadata": {
33
"tool": "RelayX",
4-
"version": "0.1.16",
4+
"version": "0.5.4",
55
"schema_version": 1,
66
"mode": "lab_signature_corpus",
77
"captured_at": "2026-06-05T00:00:00+00:00",
88
"label": "adcs-web-enrollment-epa-policy-matrix",
99
"environment": "fixture-windows-server-adcs-iis",
1010
"policy_state": "mixed_adcs_epa_matrix",
11-
"source_result_version": "0.1.16",
11+
"source_result_version": "0.5.4",
1212
"active_probe": true,
1313
"finding_count": 2
1414
},

0 commit comments

Comments
 (0)