@superbfowle/bash-history-mcp-test 0.1.4 → 0.1.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.
Files changed (3) hide show
  1. package/opencode.ts +25 -5
  2. package/package.json +20 -20
  3. package/server.ts +0 -0
package/opencode.ts CHANGED
@@ -1,11 +1,31 @@
1
- import type { Plugin } from "@opencode-ai/plugin";
1
+ import type { Plugin } from "@odebugpencode-ai/plugin";
2
2
 
3
3
  export const OpencodeBashHistoryPlugin: Plugin = async ({ client }) => {
4
+ console.log("BASH HISTORY zero-a");
5
+ await client.app.log({
6
+ service: "bash-history",
7
+ level: "info",
8
+ message: "Bash-history load",
9
+ extra: { input, output },
10
+ });
11
+ console.log("BASH HISTORY zero-b");
12
+
4
13
  return {
5
14
  "tool.execute.after": async (input, output) => {
15
+ console.log("BASH HISTORY run-a");
16
+ await client.app.log({
17
+ service: "bash-history",
18
+ level: "info",
19
+ message: "Bash-history debug",
20
+ extra: { input, output },
21
+ });
22
+ console.log("BASH HISTORY run-b");
23
+ console.log("BASH HISTORY", input, output);
24
+
6
25
  if (input.tool !== "bash") {
7
26
  return;
8
27
  }
28
+ console.log("BASH HISTORY run-c");
9
29
 
10
30
  try {
11
31
  const command = output.metadata?.args?.command;
@@ -27,7 +47,7 @@ export const OpencodeBashHistoryPlugin: Plugin = async ({ client }) => {
27
47
  service: "bash-history",
28
48
  level: "error",
29
49
  message: "Failed to start atuin history entry",
30
- extra: { error: stderr }
50
+ extra: { error: stderr },
31
51
  });
32
52
  return;
33
53
  }
@@ -47,7 +67,7 @@ export const OpencodeBashHistoryPlugin: Plugin = async ({ client }) => {
47
67
  ],
48
68
  {
49
69
  stderr: "pipe",
50
- }
70
+ },
51
71
  );
52
72
 
53
73
  const endExitCode = await endProc.exited;
@@ -57,7 +77,7 @@ export const OpencodeBashHistoryPlugin: Plugin = async ({ client }) => {
57
77
  service: "bash-history",
58
78
  level: "error",
59
79
  message: "Failed to end atuin history entry",
60
- extra: { error: stderr }
80
+ extra: { error: stderr },
61
81
  });
62
82
  }
63
83
  } catch (error) {
@@ -65,7 +85,7 @@ export const OpencodeBashHistoryPlugin: Plugin = async ({ client }) => {
65
85
  service: "bash-history",
66
86
  level: "error",
67
87
  message: "Bash history plugin error",
68
- extra: { error: String(error) }
88
+ extra: { error: String(error) },
69
89
  });
70
90
  }
71
91
  },
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
- "name": "@superbfowle/bash-history-mcp-test",
3
- "version": "0.1.4",
4
- "module": "index.ts",
5
- "type": "module",
6
- "bin": "./cli.ts",
7
- "devDependencies": {
8
- "@types/bun": "latest"
9
- },
10
- "peerDependencies": {
11
- "typescript": "^5",
12
- "@opencode-ai/plugin": "*"
13
- },
14
- "dependencies": {
15
- "@modelcontextprotocol/sdk": "^1.19.1"
16
- },
17
- "exports": {
18
- ".": "./index.ts",
19
- "./opencode-plugin": "./opencode.ts"
20
- }
21
- }
2
+ "name": "@superbfowle/bash-history-mcp-test",
3
+ "version": "0.1.6",
4
+ "module": "index.ts",
5
+ "type": "module",
6
+ "bin": "./cli.ts",
7
+ "devDependencies": {
8
+ "@types/bun": "latest"
9
+ },
10
+ "peerDependencies": {
11
+ "typescript": "^5",
12
+ "@opencode-ai/plugin": "*"
13
+ },
14
+ "dependencies": {
15
+ "@modelcontextprotocol/sdk": "^1.19.1"
16
+ },
17
+ "exports": {
18
+ ".": "./index.ts",
19
+ "./opencode-plugin": "./opencode.ts"
20
+ }
21
+ }
package/server.ts CHANGED
File without changes