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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tmux-watch",
3
- "version": "2026.2.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
  }
@@ -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: Type.Object(
77
- {
78
- action: stringEnum(ACTIONS, { description: `Action to perform: ${ACTIONS.join(", ")}` }),
79
- id: Type.Optional(Type.String({ description: "Subscription id." })),
80
- target: Type.Optional(Type.String({ description: "tmux target, e.g. session:0.0" })),
81
- label: Type.Optional(Type.String({ description: "Human-friendly label." })),
82
- note: Type.Optional(
83
- Type.String({ description: "Purpose/intent note shown to the agent on alert." }),
84
- ),
85
- sessionKey: Type.Optional(Type.String({ description: "Session key override." })),
86
- socket: Type.Optional(Type.String({ description: "tmux socket path (for -S)." })),
87
- captureIntervalSeconds: Type.Optional(
88
- Type.Number({ description: "Capture interval in seconds." }),
89
- ),
90
- intervalMs: Type.Optional(
91
- Type.Number({ description: "Legacy: capture interval in ms." }),
92
- ),
93
- stableCount: Type.Optional(
94
- Type.Number({ description: "Consecutive identical captures before alert." }),
95
- ),
96
- stableSeconds: Type.Optional(
97
- Type.Number({ description: "Legacy: stable duration in seconds." }),
98
- ),
99
- captureLines: Type.Optional(Type.Number({ description: "Lines to capture." })),
100
- stripAnsi: Type.Optional(Type.Boolean({ description: "Strip ANSI escape codes." })),
101
- enabled: Type.Optional(Type.Boolean({ description: "Enable or disable subscription." })),
102
- notifyMode: Type.Optional(
103
- stringEnum(NOTIFY_MODES, { description: "Notify mode override." }),
104
- ),
105
- targets: Type.Optional(
106
- Type.Array(
107
- Type.Object(
108
- {
109
- channel: Type.String({ description: "Channel id (e.g. telegram, gewe)." }),
110
- target: Type.String({ description: "Channel target id." }),
111
- accountId: Type.Optional(Type.String({ description: "Provider account id." })),
112
- threadId: Type.Optional(Type.String({ description: "Thread id." })),
113
- label: Type.Optional(Type.String({ description: "Label for this target." })),
114
- },
115
- { additionalProperties: false },
116
- ),
117
- ),
118
- ),
119
- includeOutput: Type.Optional(
120
- Type.Boolean({ description: "Include last captured output in list." }),
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
- { additionalProperties: false },
124
- ),
120
+ required: ["action"],
121
+ },
125
122
  async execute(_id: string, params: ToolParams): Promise<ToolResult> {
126
123
  try {
127
124
  switch (params.action) {