@ssk_dev/rpiv-ask-user-question-lean 2.4.0 → 2.4.1
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.
- package/README.md +23 -21
- package/README.zh-CN.md +26 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,49 +1,51 @@
|
|
|
1
1
|
# @ssk_dev/rpiv-ask-user-question-lean
|
|
2
2
|
|
|
3
|
-
> **Lean Pi ask-user-question plugin
|
|
3
|
+
> **Lean Pi ask-user-question plugin with identical features: 215 initialization tokens, 83% lighter than original.**
|
|
4
4
|
> [See my full setup for Pi](https://github.com/kunkun9527/my-lean-pi-setup)
|
|
5
5
|
|
|
6
6
|
[简体中文](README.zh-CN.md)
|
|
7
7
|
|
|
8
|
-
A
|
|
8
|
+
A lightweight Pi wrapper for [`@juicesharp/rpiv-ask-user-question`](https://github.com/juicesharp/rpiv-mono/tree/main/packages/rpiv-ask-user-question). It preserves interactive questionnaire prompts and structured validation while trimming repetitive prompt metadata.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Core Features
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
12
|
+
* Interactive UI: Retains the full questionnaire interface, preview elements, and RPC fallback.
|
|
13
|
+
* Structured validation: Supports single-select and multi-select questions, recommendation ordering, and strict option validation.
|
|
14
|
+
* Compact prompt schema: Strips boilerplate descriptions from the tool definition, cutting prompt overhead without changing runtime behavior.
|
|
15
15
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
The wrapper keeps the upstream `ask_user_question` runtime but shortens its tool description and prompt guidance and removes repeated schema descriptions. The complete questionnaire behavior still comes from the pinned upstream package.
|
|
19
|
-
|
|
20
|
-
## Install
|
|
16
|
+
## Installation
|
|
21
17
|
|
|
22
18
|
```bash
|
|
23
19
|
pi install npm:@ssk_dev/rpiv-ask-user-question-lean
|
|
24
20
|
```
|
|
25
21
|
|
|
26
|
-
Do not load
|
|
22
|
+
Do not load this alongside another `rpiv-ask-user-question` wrapper to avoid registering duplicate tools.
|
|
27
23
|
|
|
28
|
-
##
|
|
24
|
+
## Usage
|
|
29
25
|
|
|
30
|
-
The model
|
|
26
|
+
The model interacts with a single tool:
|
|
31
27
|
|
|
32
28
|
```text
|
|
33
29
|
ask_user_question
|
|
34
30
|
```
|
|
35
31
|
|
|
36
|
-
Use
|
|
32
|
+
Use this tool when user clarification or decision-making is required. Each call can ask 1 to 4 structured questions with 2 to 4 clear options per question.
|
|
33
|
+
|
|
34
|
+
## Context Footprint Benchmark
|
|
35
|
+
|
|
36
|
+
With only this extension enabled, its recurring initialization overhead in the model context is:
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
| Model-facing tool | Lean | Upstream `@juicesharp/rpiv-ask-user-question@2.4.0` |
|
|
39
|
+
| --- | ---: | ---: |
|
|
40
|
+
| `ask_user_question` | **215** | **1,258** |
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
This saves **1,043 tokens (82.9%)** compared to the pinned upstream package.
|
|
41
43
|
|
|
42
|
-
The
|
|
44
|
+
The benchmark was measured on Pi 0.84.4 with `pi-context-view@0.4.3` in a fresh isolated session, excluding built-in tools, skills, context files, and unrelated extensions. Context View estimates tokens as `ceil(characters / 4)`. Pure runtime UI elements and slash commands are excluded as they are not sent to the model.
|
|
43
45
|
|
|
44
46
|
## Versions
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
Upstream runtime is pinned to `@juicesharp/rpiv-ask-user-question@2.4.0`.
|
|
47
49
|
|
|
48
50
|
## Development
|
|
49
51
|
|
|
@@ -52,8 +54,8 @@ npm ci
|
|
|
52
54
|
npm run check
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
The test suite
|
|
57
|
+
The test suite runs with a local harness and does not launch the actual interactive questionnaire UI.
|
|
56
58
|
|
|
57
|
-
## License
|
|
59
|
+
## License
|
|
58
60
|
|
|
59
61
|
MIT. This project wraps the MIT-licensed [`@juicesharp/rpiv-ask-user-question`](https://github.com/juicesharp/rpiv-mono/tree/main/packages/rpiv-ask-user-question).
|
package/README.zh-CN.md
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
# @ssk_dev/rpiv-ask-user-question-lean
|
|
2
2
|
|
|
3
|
-
> **
|
|
4
|
-
>
|
|
3
|
+
> **Pi 用户提问交互插件精简版,保留全部功能,仅需 215 初始化 Token,相比原版减少 83%。**
|
|
4
|
+
> **完整配置参考:** [查看 Pi Lean Setup](https://github.com/kunkun9527/my-lean-pi-setup)
|
|
5
5
|
|
|
6
6
|
[English](README.md)
|
|
7
7
|
|
|
8
|
-
[`@juicesharp/rpiv-ask-user-question`](https://github.com/juicesharp/rpiv-mono/tree/main/packages/rpiv-ask-user-question)
|
|
8
|
+
基于 [`@juicesharp/rpiv-ask-user-question`](https://github.com/juicesharp/rpiv-mono/tree/main/packages/rpiv-ask-user-question) 的精简封装。在完整保留交互式问卷界面与选项校验的同时,精简工具描述与提示词,大幅减少初始化上下文开销。
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## 核心特性
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## 为什么更精简
|
|
17
|
-
|
|
18
|
-
包装层保留上游 `ask_user_question` 运行时,但缩短工具描述和提示指引,并删除重复的 schema 描述。完整问卷行为仍由固定版本的上游包提供。
|
|
12
|
+
* 完整交互体验:保留原版问卷交互界面、选项预览以及 RPC 回退机制。
|
|
13
|
+
* 结构化输入验证:支持单选、多选、推荐选项排序与严格的输入校验。
|
|
14
|
+
* 精简 Prompt 描述:精简工具说明中的冗余文本,让模型更轻快地发起澄清提问。
|
|
19
15
|
|
|
20
16
|
## 安装
|
|
21
17
|
|
|
@@ -23,37 +19,43 @@
|
|
|
23
19
|
pi install npm:@ssk_dev/rpiv-ask-user-question-lean
|
|
24
20
|
```
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
请勿与其它 `rpiv-ask-user-question` 包装插件同时加载,以防重复注册工具。
|
|
27
23
|
|
|
28
|
-
##
|
|
24
|
+
## 使用方法
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
模型仅会看到一个工具:
|
|
31
27
|
|
|
32
28
|
```text
|
|
33
29
|
ask_user_question
|
|
34
30
|
```
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
当遇到不明确的需求或需要用户做选择时使用。每次调用可提出 1 到 4 个结构化问题,每个问题提供 2 到 4 个明确选项。
|
|
33
|
+
|
|
34
|
+
## 初始化上下文占用对比
|
|
35
|
+
|
|
36
|
+
单独启用本插件时,注入到模型初始上下文中的 Token 占用实测如下:
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
| 模型可见工具 | Lean 精简版 | 原版 `@juicesharp/rpiv-ask-user-question@2.4.0` |
|
|
39
|
+
| --- | ---: | ---: |
|
|
40
|
+
| `ask_user_question` | **215** | **1,258** |
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
相比固定版本的上游扩展,初始开销减少了 **1,043 tokens(82.9%)**。
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
测试环境为 Pi 0.84.4 与 `pi-context-view@0.4.3` 独立会话,排除了 Pi 内置工具、Skills、上下文文件与无关扩展。Context View 按 `ceil(字符数 / 4)` 估算。未计入不会发送给模型的纯运行时 UI 与 Slash 命令。
|
|
43
45
|
|
|
44
|
-
##
|
|
46
|
+
## 版本说明
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
上游运行时锁定为 `@juicesharp/rpiv-ask-user-question@2.4.0`。
|
|
47
49
|
|
|
48
|
-
##
|
|
50
|
+
## 本地开发
|
|
49
51
|
|
|
50
52
|
```bash
|
|
51
53
|
npm ci
|
|
52
54
|
npm run check
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
测试套件使用本地
|
|
57
|
+
测试套件使用本地 Harness 运行,不会弹出实际的交互问卷 UI。
|
|
56
58
|
|
|
57
|
-
##
|
|
59
|
+
## 开源协议与致谢
|
|
58
60
|
|
|
59
|
-
MIT
|
|
61
|
+
MIT 协议。本项目封装自采用 MIT 协议的 [`@juicesharp/rpiv-ask-user-question`](https://github.com/juicesharp/rpiv-mono/tree/main/packages/rpiv-ask-user-question)。
|
package/package.json
CHANGED