@petersr/pupptyeer 0.5.0
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 +21 -0
- package/README.md +35 -0
- package/bin/pupptyeer-mcp.cjs +5 -0
- package/bin/pupptyeer.cjs +5 -0
- package/lib/launch.cjs +31 -0
- package/lib/resolve.cjs +45 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PeterSR
|
|
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,35 @@
|
|
|
1
|
+
# @petersr/pupptyeer
|
|
2
|
+
|
|
3
|
+
Install the [pupptyeer](https://github.com/PeterSR/pupptyeer) daemon, CLI, and MCP front-end as a
|
|
4
|
+
prebuilt binary, via npm. This package ships no JavaScript implementation: it is a thin launcher
|
|
5
|
+
whose `optionalDependencies` are per-platform packages (`@petersr/pupptyeer-linux-x64`,
|
|
6
|
+
`@petersr/pupptyeer-darwin-arm64`, `@petersr/pupptyeer-win32-x64`, ...), each carrying the static Go
|
|
7
|
+
binaries for one OS/arch. npm installs only the one matching your machine; the `pupptyeer` /
|
|
8
|
+
`pupptyeer-mcp` commands exec it.
|
|
9
|
+
|
|
10
|
+
pupptyeer is a local daemon that owns persistent PTY sessions, with a CLI and an MCP server.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
# global CLI + daemon
|
|
16
|
+
npm i -g @petersr/pupptyeer
|
|
17
|
+
|
|
18
|
+
pupptyeer daemon install # run the daemon as a per-user managed service
|
|
19
|
+
pupptyeer --help
|
|
20
|
+
|
|
21
|
+
# or run without installing
|
|
22
|
+
npx @petersr/pupptyeer --help
|
|
23
|
+
npx -p @petersr/pupptyeer pupptyeer-mcp --help
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Prebuilt binaries are provided for linux, macOS, and Windows on x64 and arm64. On an unsupported
|
|
27
|
+
platform the launcher prints how to build from source.
|
|
28
|
+
|
|
29
|
+
To program against the daemon, use a client library instead:
|
|
30
|
+
[`pupptyeer-client`](https://www.npmjs.com/package/pupptyeer-client) (Node),
|
|
31
|
+
[`pupptyeer-client`](https://pypi.org/project/pupptyeer-client/) (Python), or the Go client.
|
|
32
|
+
|
|
33
|
+
## License
|
|
34
|
+
|
|
35
|
+
MIT
|
package/lib/launch.cjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { spawnSync } = require("node:child_process");
|
|
4
|
+
const { resolveBinary } = require("./resolve.cjs");
|
|
5
|
+
|
|
6
|
+
// Resolve the named bundled binary, exec it with this process's args, and
|
|
7
|
+
// propagate its exit status (or terminating signal). Used by the bin shims.
|
|
8
|
+
function launch(name) {
|
|
9
|
+
let bin;
|
|
10
|
+
try {
|
|
11
|
+
bin = resolveBinary(name);
|
|
12
|
+
} catch (err) {
|
|
13
|
+
console.error(err.message);
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
|
|
18
|
+
|
|
19
|
+
if (result.error) {
|
|
20
|
+
console.error(`pupptyeer: failed to launch ${bin}: ${result.error.message}`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
if (result.signal) {
|
|
24
|
+
// Re-raise the signal so callers see the child's termination cause.
|
|
25
|
+
process.kill(process.pid, result.signal);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
process.exit(result.status === null ? 1 : result.status);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = { launch };
|
package/lib/resolve.cjs
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Map this Node process's platform to the per-platform npm package that ships
|
|
4
|
+
// its prebuilt binaries. Keep this table in step with ../../platforms.mjs (this
|
|
5
|
+
// copy stays plain CommonJS so the wrapper needs no build step).
|
|
6
|
+
const SUPPORTED = {
|
|
7
|
+
"linux-x64": "@petersr/pupptyeer-linux-x64",
|
|
8
|
+
"linux-arm64": "@petersr/pupptyeer-linux-arm64",
|
|
9
|
+
"darwin-x64": "@petersr/pupptyeer-darwin-x64",
|
|
10
|
+
"darwin-arm64": "@petersr/pupptyeer-darwin-arm64",
|
|
11
|
+
"win32-x64": "@petersr/pupptyeer-win32-x64",
|
|
12
|
+
"win32-arm64": "@petersr/pupptyeer-win32-arm64",
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
function platformKey() {
|
|
16
|
+
return `${process.platform}-${process.arch}`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Resolve the absolute path to a bundled binary ("pupptyeer" or
|
|
20
|
+
// "pupptyeer-mcp") inside the matching platform package. Throws with an
|
|
21
|
+
// actionable message if the platform is unsupported or its package is absent.
|
|
22
|
+
function resolveBinary(name) {
|
|
23
|
+
const key = platformKey();
|
|
24
|
+
const pkg = SUPPORTED[key];
|
|
25
|
+
if (!pkg) {
|
|
26
|
+
throw new Error(
|
|
27
|
+
`pupptyeer: unsupported platform "${key}". Supported: ${Object.keys(SUPPORTED).join(", ")}.\n` +
|
|
28
|
+
`Build from source instead: https://github.com/PeterSR/pupptyeer`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
const ext = process.platform === "win32" ? ".exe" : "";
|
|
32
|
+
try {
|
|
33
|
+
return require.resolve(`${pkg}/bin/${name}${ext}`);
|
|
34
|
+
} catch (err) {
|
|
35
|
+
throw new Error(
|
|
36
|
+
`pupptyeer: the platform package "${pkg}" is not installed.\n` +
|
|
37
|
+
`It should install automatically as an optional dependency of "pupptyeer".\n` +
|
|
38
|
+
`If you used --no-optional or --omit=optional, reinstall without it, or run:\n` +
|
|
39
|
+
` npm i ${pkg}\n` +
|
|
40
|
+
`Underlying error: ${err && err.message ? err.message : err}`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
module.exports = { resolveBinary, platformKey, SUPPORTED };
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@petersr/pupptyeer",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Install the pupptyeer daemon, CLI, and MCP front-end as a prebuilt binary for your platform.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"pupptyeer": "bin/pupptyeer.cjs",
|
|
7
|
+
"pupptyeer-mcp": "bin/pupptyeer-mcp.cjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"lib",
|
|
12
|
+
"README.md",
|
|
13
|
+
"LICENSE"
|
|
14
|
+
],
|
|
15
|
+
"keywords": [
|
|
16
|
+
"pty",
|
|
17
|
+
"terminal",
|
|
18
|
+
"tty",
|
|
19
|
+
"daemon",
|
|
20
|
+
"mcp",
|
|
21
|
+
"pupptyeer",
|
|
22
|
+
"cli"
|
|
23
|
+
],
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/PeterSR/pupptyeer.git",
|
|
27
|
+
"directory": "npm/pupptyeer"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/PeterSR/pupptyeer#readme",
|
|
30
|
+
"bugs": "https://github.com/PeterSR/pupptyeer/issues",
|
|
31
|
+
"author": "PeterSR",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18"
|
|
35
|
+
},
|
|
36
|
+
"optionalDependencies": {
|
|
37
|
+
"@petersr/pupptyeer-linux-x64": "0.5.0",
|
|
38
|
+
"@petersr/pupptyeer-linux-arm64": "0.5.0",
|
|
39
|
+
"@petersr/pupptyeer-darwin-x64": "0.5.0",
|
|
40
|
+
"@petersr/pupptyeer-darwin-arm64": "0.5.0",
|
|
41
|
+
"@petersr/pupptyeer-win32-x64": "0.5.0",
|
|
42
|
+
"@petersr/pupptyeer-win32-arm64": "0.5.0"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
}
|
|
47
|
+
}
|