@erchoc/chatbot 0.1.0-beta.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Erchoc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # @erchoc/chatbot
2
+
3
+ Cross-platform voice assistant that lives in your terminal.
4
+
5
+ ```bash
6
+ npm install -g @erchoc/chatbot
7
+ cb --version
8
+ ```
9
+
10
+ Equivalent to `brew install erchoc/tap/chatbot`. Both channels ship the same
11
+ binary from the [Erchoc/chatbot](https://github.com/Erchoc/chatbot) GitHub
12
+ Release.
13
+
14
+ ## Supported platforms
15
+
16
+ - macOS (arm64 + x64, universal binary)
17
+ - Linux (x64, arm64)
18
+
19
+ Windows is not supported yet — the command prints a friendly error.
20
+
21
+ ## How this package works
22
+
23
+ The published tarball contains the pre-built native binaries for every
24
+ supported platform alongside a small Node.js launcher. The launcher picks
25
+ the right binary at runtime based on `process.platform` / `process.arch`
26
+ and execs it with stdio inheritance. There is no `postinstall` step and no
27
+ network access at install time.
28
+
29
+ For the full packaging spec see
30
+ [homebrew-tap/docs/npm-convention.md](https://github.com/Erchoc/homebrew-tap/blob/master/docs/npm-convention.md).
31
+
32
+ ## License
33
+
34
+ MIT. See `LICENSE`.
35
+
36
+ ## Issues
37
+
38
+ Please report issues at <https://github.com/Erchoc/chatbot/issues>.
package/bin/.gitkeep ADDED
File without changes
package/bin/cb-darwin ADDED
Binary file
Binary file
Binary file
package/bin/cb.js ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ const { spawnSync } = require('node:child_process')
3
+ const { join } = require('node:path')
4
+
5
+ const map = {
6
+ 'darwin-arm64': 'cb-darwin',
7
+ 'darwin-x64': 'cb-darwin',
8
+ 'linux-x64': 'cb-linux-x64',
9
+ 'linux-arm64': 'cb-linux-arm64',
10
+ }
11
+
12
+ const key = `${process.platform}-${process.arch}`
13
+ const name = map[key]
14
+ if (!name) {
15
+ console.error(`cb: unsupported platform ${key}. Supported: ${Object.keys(map).join(', ')}`)
16
+ process.exit(1)
17
+ }
18
+
19
+ const bin = join(__dirname, name)
20
+ const r = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' })
21
+ if (r.error) {
22
+ console.error(r.error.message)
23
+ process.exit(1)
24
+ }
25
+ process.exit(r.status ?? 1)
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@erchoc/chatbot",
3
+ "version": "0.1.0-beta.3",
4
+ "description": "Cross-platform voice assistant that lives in your terminal",
5
+ "homepage": "https://github.com/Erchoc/chatbot",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Erchoc/chatbot.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/Erchoc/chatbot/issues"
12
+ },
13
+ "license": "MIT",
14
+ "author": "Erchoc",
15
+ "bin": {
16
+ "cb": "bin/cb.js"
17
+ },
18
+ "files": [
19
+ "bin/",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "os": [
24
+ "darwin",
25
+ "linux"
26
+ ],
27
+ "cpu": [
28
+ "x64",
29
+ "arm64"
30
+ ],
31
+ "engines": {
32
+ "node": ">=16"
33
+ },
34
+ "publishConfig": {
35
+ "access": "public"
36
+ }
37
+ }