@pinchpass/cli 1.0.0 → 1.0.2

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/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- declare const _default: () => Promise<{
1
+ declare const _default: ({ $ }: {
2
+ $: any;
3
+ }) => Promise<{
2
4
  tool: {
3
5
  request_secret: {
4
6
  description: string;
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { tool } from "@opencode-ai/plugin/tool";
2
- import { execSync } from "child_process";
3
- export default async () => {
2
+ export default async ({ $ }) => {
4
3
  return {
5
4
  tool: {
6
5
  request_secret: tool({
@@ -27,23 +26,23 @@ export default async () => {
27
26
  .describe("Minutes until the link expires (default: 30)"),
28
27
  },
29
28
  async execute(args) {
30
- const cmd = ["pinchpass", "request", ...args.names, "-json"];
29
+ const pieces = ["pinchpass", "request", ...args.names, "-json"];
31
30
  if (args.tunnel)
32
- cmd.push("-tunnel");
31
+ pieces.push("-tunnel");
33
32
  if (args.note)
34
- cmd.push("-note", args.note);
33
+ pieces.push("-note", args.note);
35
34
  if (args.ttl)
36
- cmd.push("-ttl", String(args.ttl));
35
+ pieces.push("-ttl", String(args.ttl));
37
36
  try {
38
- const stdout = execSync(cmd.join(" "), {
39
- encoding: "utf-8",
40
- timeout: (args.ttl ?? 30) * 60 * 1000,
41
- });
42
- return stdout;
37
+ const result = await $.raw(pieces);
38
+ return result.stdout || result.text || String(result);
43
39
  }
44
40
  catch (err) {
45
41
  const msg = err instanceof Error ? err.message : String(err);
46
- return `Failed to generate secret request: ${msg}`;
42
+ const stderr = err && typeof err === "object" && "stderr" in err
43
+ ? err.stderr
44
+ : "";
45
+ return `Failed: ${msg}${stderr ? "\n" + stderr : ""}`;
47
46
  }
48
47
  },
49
48
  }),
@@ -0,0 +1,8 @@
1
+ {
2
+ "id": "pinchpass",
3
+ "name": "PinchPass",
4
+ "description": "Generate one-time E2E-encrypted secret request links",
5
+ "activation": {
6
+ "onStartup": false
7
+ }
8
+ }
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@pinchpass/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
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
- "SKILL.md"
9
+ "SKILL.md",
10
+ "openclaw.plugin.json"
10
11
  ],
11
12
  "openclaw": {
12
13
  "extensions": [