pi-voice-input 0.2.6 → 0.2.7

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/AGENTS.md CHANGED
@@ -34,7 +34,9 @@ Check that `npm pack --dry-run` includes only publishable files, normally:
34
34
 
35
35
  ```text
36
36
  AGENTS.md
37
+ CONTRIBUTING.md
37
38
  README.md
39
+ ROADMAP.md
38
40
  extensions/voice-input.ts
39
41
  package.json
40
42
  ```
@@ -62,22 +64,23 @@ Use conventional commit messages, for example:
62
64
 
63
65
  ## Release workflow
64
66
 
65
- 1. Bump `package.json` version. npm versions are immutable.
66
- 2. Validate with the commands above.
67
- 3. Commit with a conventional commit message.
68
- 4. Push to GitHub:
67
+ Use the project release script for normal releases. It takes exactly one argument: the next package version.
69
68
 
70
69
  ```bash
71
- git push origin main
70
+ scripts/release.sh <version>
72
71
  ```
73
72
 
74
- 5. Publish to npm:
73
+ Example:
75
74
 
76
75
  ```bash
77
- npm publish --access public
76
+ scripts/release.sh 0.2.7
78
77
  ```
79
78
 
80
- 6. Update the local installed pi package and verify startup:
79
+ The script updates `package.json`, installs dependencies without writing a lockfile, runs validation, checks the package tarball, scans for likely secrets, commits, pushes to GitHub, publishes to npm with public access, and prints npm package metadata.
80
+
81
+ Do not manually run separate commit/push/publish steps unless the script is broken or the user explicitly asks for a manual release path. npm versions are immutable, so always choose a new version.
82
+
83
+ After publishing, update the local installed pi package from npm and verify startup:
81
84
 
82
85
  ```bash
83
86
  pi update npm:pi-voice-input
@@ -0,0 +1,139 @@
1
+ # Contributing to pi Voice Input
2
+
3
+ Thank you for your interest in contributing to pi Voice Input. This project is a small, user-facing pi extension, so contributions should stay focused, easy to review, and safe for end users.
4
+
5
+ ## Ways to contribute
6
+
7
+ Useful contributions include:
8
+
9
+ - bug reports with clear reproduction steps
10
+ - documentation improvements
11
+ - recorder support and diagnostics for Linux or macOS
12
+ - ASR provider improvements behind the existing provider boundary
13
+ - small usability improvements to commands, setup, or status messages
14
+ - tests or validation notes for platforms the maintainer cannot easily access
15
+
16
+ Please avoid broad rewrites or unrelated cleanup in feature pull requests.
17
+
18
+ ## Before you start
19
+
20
+ 1. Check existing issues and pull requests to avoid duplicate work.
21
+ 2. For larger changes, open an issue first and describe the proposed direction.
22
+ 3. Keep changes small and focused.
23
+ 4. Do not commit API keys, local config files, recordings, transcripts, or other private data.
24
+
25
+ ## Development setup
26
+
27
+ Requirements:
28
+
29
+ - Node.js compatible with the current pi runtime
30
+ - npm
31
+ - pi installed locally
32
+ - one supported recorder:
33
+ - Linux: `pw-record` or `arecord`
34
+ - macOS: `afrecord`
35
+
36
+ Clone and install dependencies:
37
+
38
+ ```bash
39
+ git clone git@github.com:tr-nc/pi-voice-input.git
40
+ cd pi-voice-input
41
+ npm install
42
+ ```
43
+
44
+ Run the extension directly from the checkout:
45
+
46
+ ```bash
47
+ pi -e ./extensions/voice-input.ts
48
+ ```
49
+
50
+ Or install the local checkout into pi while developing:
51
+
52
+ ```bash
53
+ pi install .
54
+ ```
55
+
56
+ After changing code, restart pi. `/reload` may not replace extension code that was already loaded by the current pi process.
57
+
58
+ ## Configuration for local testing
59
+
60
+ The extension stores user config at:
61
+
62
+ ```text
63
+ ~/.pi/agent/voice-input.config.json
64
+ ```
65
+
66
+ Create or normalize it from inside pi:
67
+
68
+ ```text
69
+ /voice init
70
+ ```
71
+
72
+ Set the VolcEngine Speech API key from inside pi:
73
+
74
+ ```text
75
+ /voice key
76
+ ```
77
+
78
+ Do not commit this config file or any secrets.
79
+
80
+ ## Validation
81
+
82
+ Before opening a pull request, run:
83
+
84
+ ```bash
85
+ npx tsc --noEmit --module NodeNext --moduleResolution NodeNext --target ES2022 --skipLibCheck --types node extensions/voice-input.ts
86
+ PI_OFFLINE=1 pi -e ./extensions/voice-input.ts --list-models
87
+ npm pack --dry-run
88
+ git diff --check
89
+ ```
90
+
91
+ For recorder or ASR changes, also include a short manual test note in the pull request, for example:
92
+
93
+ - platform and OS version
94
+ - recorder used (`pw-record`, `arecord`, or `afrecord`)
95
+ - whether recording starts and stops cleanly
96
+ - whether transcription inserts text into the editor
97
+ - any relevant log output or errors
98
+
99
+ macOS support is implemented but may need more community validation. macOS test reports are especially welcome.
100
+
101
+ ## Code style
102
+
103
+ - Use TypeScript.
104
+ - Keep the extension self-contained and dependency-light.
105
+ - Prefer clear, explicit error messages over silent fallback behavior.
106
+ - Preserve the existing user workflow unless the change is intentional and documented.
107
+ - Keep provider-specific ASR logic isolated from generic recording and editor insertion logic.
108
+
109
+ ## Documentation
110
+
111
+ Update `README.md` when changing user-visible behavior, setup steps, commands, supported platforms, or configuration.
112
+
113
+ Update `ROADMAP.md` when changing the status of user-visible planned work.
114
+
115
+ ## Pull request checklist
116
+
117
+ Before submitting, confirm:
118
+
119
+ - [ ] The change is focused and easy to review.
120
+ - [ ] No secrets, recordings, transcripts, or local config files are committed.
121
+ - [ ] Validation commands were run, or skipped with a reason.
122
+ - [ ] User-facing docs were updated when needed.
123
+ - [ ] Platform-specific behavior is documented.
124
+
125
+ ## Releases
126
+
127
+ Maintainers publish releases with:
128
+
129
+ ```bash
130
+ scripts/release.sh <version>
131
+ ```
132
+
133
+ Example:
134
+
135
+ ```bash
136
+ scripts/release.sh 0.2.7
137
+ ```
138
+
139
+ The script validates, commits, pushes, publishes to npm, and checks the published package metadata.
package/README.md CHANGED
@@ -152,6 +152,8 @@ Slash commands:
152
152
 
153
153
  ## Development
154
154
 
155
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines, validation commands, and pull request expectations.
156
+
155
157
  Clone the repo and install dependencies:
156
158
 
157
159
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-voice-input",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Press Ctrl+Shift+R to dictate prompts into Pi using VolcEngine ASR",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -28,6 +28,7 @@
28
28
  "files": [
29
29
  "extensions",
30
30
  "README.md",
31
+ "CONTRIBUTING.md",
31
32
  "ROADMAP.md",
32
33
  "AGENTS.md"
33
34
  ],