tmux-watch 2026.2.2 → 2026.2.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/package.json +2 -4
- package/src/tmux-watch-tool.ts +47 -50
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tmux-watch",
|
|
3
|
-
"version": "2026.2.
|
|
3
|
+
"version": "2026.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenClaw tmux output watchdog plugin",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,9 +41,7 @@
|
|
|
41
41
|
"typescript": "5.7.3",
|
|
42
42
|
"typescript-eslint": "8.22.0"
|
|
43
43
|
},
|
|
44
|
-
"dependencies": {
|
|
45
|
-
"@sinclair/typebox": "0.34.48"
|
|
46
|
-
},
|
|
44
|
+
"dependencies": {},
|
|
47
45
|
"peerDependencies": {
|
|
48
46
|
"openclaw": ">=2026.1.29"
|
|
49
47
|
}
|
package/src/tmux-watch-tool.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { stringEnum } from "openclaw/plugin-sdk";
|
|
3
1
|
import type { NotifyMode, NotifyTarget } from "./config.js";
|
|
4
2
|
import type { TmuxWatchManager, TmuxWatchSubscription } from "./manager.js";
|
|
5
3
|
|
|
@@ -73,55 +71,54 @@ export function createTmuxWatchTool(manager: TmuxWatchManager) {
|
|
|
73
71
|
name: "tmux-watch",
|
|
74
72
|
description:
|
|
75
73
|
"Manage tmux-watch subscriptions (add/remove/list) that monitor tmux pane output.",
|
|
76
|
-
parameters:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
stableCount:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
),
|
|
74
|
+
parameters: {
|
|
75
|
+
type: "object",
|
|
76
|
+
additionalProperties: false,
|
|
77
|
+
properties: {
|
|
78
|
+
action: {
|
|
79
|
+
type: "string",
|
|
80
|
+
enum: [...ACTIONS],
|
|
81
|
+
description: `Action to perform: ${ACTIONS.join(", ")}`,
|
|
82
|
+
},
|
|
83
|
+
id: { type: "string", description: "Subscription id." },
|
|
84
|
+
target: { type: "string", description: "tmux target, e.g. session:0.0" },
|
|
85
|
+
label: { type: "string", description: "Human-friendly label." },
|
|
86
|
+
note: { type: "string", description: "Purpose/intent note shown to the agent on alert." },
|
|
87
|
+
sessionKey: { type: "string", description: "Session key override." },
|
|
88
|
+
socket: { type: "string", description: "tmux socket path (for -S)." },
|
|
89
|
+
captureIntervalSeconds: { type: "number", description: "Capture interval in seconds." },
|
|
90
|
+
intervalMs: { type: "number", description: "Legacy: capture interval in ms." },
|
|
91
|
+
stableCount: {
|
|
92
|
+
type: "number",
|
|
93
|
+
description: "Consecutive identical captures before alert.",
|
|
94
|
+
},
|
|
95
|
+
stableSeconds: { type: "number", description: "Legacy: stable duration in seconds." },
|
|
96
|
+
captureLines: { type: "number", description: "Lines to capture." },
|
|
97
|
+
stripAnsi: { type: "boolean", description: "Strip ANSI escape codes." },
|
|
98
|
+
enabled: { type: "boolean", description: "Enable or disable subscription." },
|
|
99
|
+
notifyMode: {
|
|
100
|
+
type: "string",
|
|
101
|
+
enum: [...NOTIFY_MODES],
|
|
102
|
+
description: "Notify mode override.",
|
|
103
|
+
},
|
|
104
|
+
targets: {
|
|
105
|
+
type: "array",
|
|
106
|
+
items: {
|
|
107
|
+
type: "object",
|
|
108
|
+
additionalProperties: false,
|
|
109
|
+
properties: {
|
|
110
|
+
channel: { type: "string", description: "Channel id (e.g. telegram, gewe)." },
|
|
111
|
+
target: { type: "string", description: "Channel target id." },
|
|
112
|
+
accountId: { type: "string", description: "Provider account id." },
|
|
113
|
+
threadId: { type: "string", description: "Thread id." },
|
|
114
|
+
label: { type: "string", description: "Label for this target." },
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
includeOutput: { type: "boolean", description: "Include last captured output in list." },
|
|
122
119
|
},
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
required: ["action"],
|
|
121
|
+
},
|
|
125
122
|
async execute(_id: string, params: ToolParams): Promise<ToolResult> {
|
|
126
123
|
try {
|
|
127
124
|
switch (params.action) {
|