@pinchpass/cli 1.0.2 → 1.0.6

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.
@@ -4,5 +4,9 @@
4
4
  "description": "Generate one-time E2E-encrypted secret request links",
5
5
  "activation": {
6
6
  "onStartup": false
7
+ },
8
+ "configSchema": {
9
+ "type": "object",
10
+ "additionalProperties": false
7
11
  }
8
12
  }
package/package.json CHANGED
@@ -1,28 +1,27 @@
1
1
  {
2
2
  "name": "@pinchpass/cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.6",
4
4
  "description": "One-time E2E-encrypted secret request links for OpenClaw agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "files": [
8
8
  "dist",
9
9
  "SKILL.md",
10
- "openclaw.plugin.json"
10
+ "openclaw.plugin.json",
11
+ "scripts"
11
12
  ],
12
13
  "openclaw": {
13
- "extensions": [
14
- "./dist/index.js"
15
- ]
14
+ "extensions": ["./dist/index.js"]
16
15
  },
17
16
  "scripts": {
18
17
  "build": "tsc",
18
+ "postinstall": "node scripts/install-binary.js",
19
19
  "prepublishOnly": "npm run build"
20
20
  },
21
21
  "dependencies": {
22
22
  "@opencode-ai/plugin": "^1.16.2"
23
23
  },
24
24
  "devDependencies": {
25
- "@types/node": "^25.9.2",
26
25
  "typescript": "^5.9.0"
27
26
  },
28
27
  "publishConfig": {
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execSync } from "child_process";
4
+ import { existsSync, mkdirSync, writeFileSync, chmodSync } from "fs";
5
+ import { homedir, platform } from "os";
6
+
7
+ const VERSION = "latest";
8
+ const REPO = "rubybear-lgtm/PinchPass";
9
+
10
+ function detectBinary() {
11
+ const arch = process.arch === "arm64" ? "arm64" : "amd64";
12
+ const osMap = {
13
+ darwin: "darwin",
14
+ linux: "linux",
15
+ win32: "windows",
16
+ };
17
+ const plat = osMap[process.platform];
18
+ if (!plat) throw new Error(`Unsupported platform: ${process.platform}`);
19
+ return { name: `pinchpass-${plat}-${arch}`, plat, arch };
20
+ }
21
+
22
+ async function install() {
23
+ const { name } = detectBinary();
24
+ const installDir = `${homedir()}/.openclaw/bin`;
25
+ const dest = `${installDir}/pinchpass`;
26
+
27
+ if (existsSync(dest)) {
28
+ console.log(`pinchpass already installed at ${dest}`);
29
+ return;
30
+ }
31
+
32
+ const url =
33
+ VERSION === "latest"
34
+ ? `https://github.com/${REPO}/releases/latest/download/${name}`
35
+ : `https://github.com/${REPO}/releases/download/v${VERSION}/${name}`;
36
+
37
+ console.log(`Downloading pinchpass from ${url}...`);
38
+
39
+ mkdirSync(installDir, { recursive: true });
40
+
41
+ if (process.platform === "win32") {
42
+ execSync(`curl -sL "${url}" -o "${dest}.exe"`, { stdio: "inherit" });
43
+ } else {
44
+ execSync(`curl -sL "${url}" -o "${dest}"`, { stdio: "inherit" });
45
+ chmodSync(dest, 0o755);
46
+ }
47
+
48
+ console.log(`Installed pinchpass to ${dest}`);
49
+ console.log(`Add ${installDir} to your PATH if not already present.`);
50
+ }
51
+
52
+ install().catch((err) => {
53
+ console.error(`Failed to install pinchpass binary: ${err.message}`);
54
+ console.log(
55
+ `To build from source: cd pinchpass-plugin && go build -o pinchpass .`
56
+ );
57
+ process.exit(1);
58
+ });
package/dist/index.d.ts DELETED
@@ -1,22 +0,0 @@
1
- declare const _default: ({ $ }: {
2
- $: any;
3
- }) => Promise<{
4
- tool: {
5
- request_secret: {
6
- description: string;
7
- args: {
8
- names: import("zod").ZodArray<import("zod").ZodString>;
9
- tunnel: import("zod").ZodOptional<import("zod").ZodBoolean>;
10
- note: import("zod").ZodOptional<import("zod").ZodString>;
11
- ttl: import("zod").ZodOptional<import("zod").ZodNumber>;
12
- };
13
- execute(args: {
14
- names: string[];
15
- tunnel?: boolean | undefined;
16
- note?: string | undefined;
17
- ttl?: number | undefined;
18
- }, context: import("@opencode-ai/plugin/tool").ToolContext): Promise<import("@opencode-ai/plugin/tool").ToolResult>;
19
- };
20
- };
21
- }>;
22
- export default _default;