hiloop-openclaw 0.2.0 → 0.4.0
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 +37 -27
- package/dist/index.js +252 -32
- package/dist/index.js.map +1 -1
- package/openclaw.plugin.json +9 -0
- package/package.json +14 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,30 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { createTools } from "./src/tools.js";
|
|
4
|
-
declare function registerChannel(channel: {
|
|
1
|
+
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
|
|
2
|
+
declare const plugin: {
|
|
5
3
|
id: string;
|
|
6
|
-
meta: {
|
|
7
|
-
label: string;
|
|
8
|
-
description: string;
|
|
9
|
-
};
|
|
10
|
-
capabilities: string[];
|
|
11
|
-
config: typeof HiloopChannelConfig;
|
|
12
|
-
outbound: typeof outbound;
|
|
13
|
-
inbound: typeof inbound;
|
|
14
|
-
login: typeof login;
|
|
15
|
-
tools?: ReturnType<typeof createTools>;
|
|
16
|
-
}): void;
|
|
17
|
-
declare function registerTool(tool: {
|
|
18
4
|
name: string;
|
|
19
5
|
description: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
6
|
+
configSchema: {
|
|
7
|
+
parse(value: unknown): {
|
|
8
|
+
apiKey: string;
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
pollIntervalMs: number;
|
|
11
|
+
defaultPriority: "critical" | "high" | "normal" | "low";
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
};
|
|
14
|
+
uiHints: {
|
|
15
|
+
apiKey: {
|
|
16
|
+
label: string;
|
|
17
|
+
help: string;
|
|
18
|
+
sensitive: boolean;
|
|
19
|
+
};
|
|
20
|
+
baseUrl: {
|
|
21
|
+
label: string;
|
|
22
|
+
help: string;
|
|
23
|
+
};
|
|
24
|
+
pollIntervalMs: {
|
|
25
|
+
label: string;
|
|
26
|
+
help: string;
|
|
27
|
+
advanced: boolean;
|
|
28
|
+
};
|
|
29
|
+
defaultPriority: {
|
|
30
|
+
label: string;
|
|
31
|
+
help: string;
|
|
32
|
+
};
|
|
33
|
+
enabled: {
|
|
34
|
+
label: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
register(api: OpenClawPluginApi): void;
|
|
39
|
+
};
|
|
40
|
+
export default plugin;
|
package/dist/index.js
CHANGED
|
@@ -1,35 +1,255 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { HiloopApiClient } from "./src/api-client.js";
|
|
1
3
|
import { HiloopChannelConfig } from "./src/config.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export default function setup(api) {
|
|
12
|
-
api.registerChannel({
|
|
13
|
-
id: "hiloop",
|
|
14
|
-
meta: {
|
|
15
|
-
label: "Hiloop",
|
|
16
|
-
description: "Human-in-the-loop: approvals, chat, reviews, forms, live sessions, voice.",
|
|
4
|
+
const hiloopConfigSchema = {
|
|
5
|
+
parse(value) {
|
|
6
|
+
return HiloopChannelConfig.parse(value && typeof value === "object" ? value : {});
|
|
7
|
+
},
|
|
8
|
+
uiHints: {
|
|
9
|
+
apiKey: {
|
|
10
|
+
label: "API Key",
|
|
11
|
+
help: "Your Hiloop agent API key (starts with hlp_)",
|
|
12
|
+
sensitive: true,
|
|
17
13
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
14
|
+
baseUrl: {
|
|
15
|
+
label: "Base URL",
|
|
16
|
+
help: "Hiloop API URL (default: https://api.hi-loop.com)",
|
|
17
|
+
},
|
|
18
|
+
pollIntervalMs: {
|
|
19
|
+
label: "Poll Interval (ms)",
|
|
20
|
+
help: "How often to check for new messages",
|
|
21
|
+
advanced: true,
|
|
22
|
+
},
|
|
23
|
+
defaultPriority: {
|
|
24
|
+
label: "Default Priority",
|
|
25
|
+
help: "Default priority for new interactions",
|
|
26
|
+
},
|
|
27
|
+
enabled: { label: "Enabled" },
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
// Tool schemas using TypeBox (OpenClaw standard)
|
|
31
|
+
const ApprovalSchema = Type.Object({
|
|
32
|
+
title: Type.String({ description: "What you need approved" }),
|
|
33
|
+
options: Type.Optional(Type.Array(Type.String(), { description: "Choices (default: Approve/Deny)" })),
|
|
34
|
+
priority: Type.Optional(Type.Union([
|
|
35
|
+
Type.Literal("critical"),
|
|
36
|
+
Type.Literal("high"),
|
|
37
|
+
Type.Literal("normal"),
|
|
38
|
+
Type.Literal("low"),
|
|
39
|
+
])),
|
|
40
|
+
deadlineMinutes: Type.Optional(Type.Number({ description: "Deadline in minutes" })),
|
|
41
|
+
description: Type.Optional(Type.String({ description: "Additional context" })),
|
|
42
|
+
});
|
|
43
|
+
const InteractionIdSchema = Type.Object({
|
|
44
|
+
interactionId: Type.String({ description: "The interaction ID" }),
|
|
45
|
+
});
|
|
46
|
+
const AwaitSchema = Type.Object({
|
|
47
|
+
interactionId: Type.String({ description: "The interaction ID" }),
|
|
48
|
+
timeout: Type.Optional(Type.Number({ description: "Timeout in seconds (max 30)" })),
|
|
49
|
+
});
|
|
50
|
+
const ReviewSchema = Type.Object({
|
|
51
|
+
title: Type.String({ description: "What needs reviewing" }),
|
|
52
|
+
description: Type.Optional(Type.String({ description: "Content to review" })),
|
|
53
|
+
priority: Type.Optional(Type.Union([
|
|
54
|
+
Type.Literal("critical"),
|
|
55
|
+
Type.Literal("high"),
|
|
56
|
+
Type.Literal("normal"),
|
|
57
|
+
Type.Literal("low"),
|
|
58
|
+
])),
|
|
59
|
+
deadlineMinutes: Type.Optional(Type.Number()),
|
|
60
|
+
});
|
|
61
|
+
const FormSchema = Type.Object({
|
|
62
|
+
title: Type.String({ description: "Form title" }),
|
|
63
|
+
formSchema: Type.String({ description: "JSON schema for form fields" }),
|
|
64
|
+
priority: Type.Optional(Type.Union([
|
|
65
|
+
Type.Literal("critical"),
|
|
66
|
+
Type.Literal("high"),
|
|
67
|
+
Type.Literal("normal"),
|
|
68
|
+
Type.Literal("low"),
|
|
69
|
+
])),
|
|
70
|
+
deadlineMinutes: Type.Optional(Type.Number()),
|
|
71
|
+
});
|
|
72
|
+
const NotifySchema = Type.Object({
|
|
73
|
+
title: Type.String({ description: "Notification title" }),
|
|
74
|
+
description: Type.Optional(Type.String({ description: "Notification body" })),
|
|
75
|
+
priority: Type.Optional(Type.Union([
|
|
76
|
+
Type.Literal("critical"),
|
|
77
|
+
Type.Literal("high"),
|
|
78
|
+
Type.Literal("normal"),
|
|
79
|
+
Type.Literal("low"),
|
|
80
|
+
])),
|
|
81
|
+
});
|
|
82
|
+
const json = (payload) => ({
|
|
83
|
+
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
84
|
+
details: payload,
|
|
85
|
+
});
|
|
86
|
+
const plugin = {
|
|
87
|
+
id: "hiloop",
|
|
88
|
+
name: "Hiloop",
|
|
89
|
+
description: "Human-in-the-loop: approvals, chat, reviews, forms, live sessions, voice",
|
|
90
|
+
configSchema: hiloopConfigSchema,
|
|
91
|
+
register(api) {
|
|
92
|
+
const cfg = hiloopConfigSchema.parse(api.pluginConfig);
|
|
93
|
+
const client = new HiloopApiClient(cfg);
|
|
94
|
+
// --- Tools ---
|
|
95
|
+
api.registerTool({
|
|
96
|
+
name: "hiloop_request_approval",
|
|
97
|
+
label: "Request Approval",
|
|
98
|
+
description: "Request approval from a human via Hiloop. Use when you need permission " +
|
|
99
|
+
"to proceed with a dangerous or irreversible action.",
|
|
100
|
+
parameters: ApprovalSchema,
|
|
101
|
+
async execute(_toolCallId, params) {
|
|
102
|
+
try {
|
|
103
|
+
const ix = await client.createInteraction({
|
|
104
|
+
type: "approval",
|
|
105
|
+
encryptedTitle: String(params.title),
|
|
106
|
+
encryptedDescription: typeof params.description === "string" ? params.description : undefined,
|
|
107
|
+
encryptedOptions: JSON.stringify(params.options || ["Approve", "Deny"]),
|
|
108
|
+
priority: (params.priority || cfg.defaultPriority),
|
|
109
|
+
deadlineMinutes: typeof params.deadlineMinutes === "number" ? params.deadlineMinutes : undefined,
|
|
110
|
+
});
|
|
111
|
+
return json({ interactionId: ix.id, status: ix.status });
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
return json({ error: err instanceof Error ? err.message : String(err) });
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
api.registerTool({
|
|
119
|
+
name: "hiloop_request_review",
|
|
120
|
+
label: "Request Review",
|
|
121
|
+
description: "Request a human review of content, code, or a document via Hiloop.",
|
|
122
|
+
parameters: ReviewSchema,
|
|
123
|
+
async execute(_toolCallId, params) {
|
|
124
|
+
try {
|
|
125
|
+
const ix = await client.createInteraction({
|
|
126
|
+
type: "review",
|
|
127
|
+
encryptedTitle: String(params.title),
|
|
128
|
+
encryptedDescription: typeof params.description === "string" ? params.description : undefined,
|
|
129
|
+
priority: (params.priority || cfg.defaultPriority),
|
|
130
|
+
deadlineMinutes: typeof params.deadlineMinutes === "number" ? params.deadlineMinutes : undefined,
|
|
131
|
+
});
|
|
132
|
+
return json({ interactionId: ix.id, status: ix.status });
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
return json({ error: err instanceof Error ? err.message : String(err) });
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
api.registerTool({
|
|
140
|
+
name: "hiloop_request_form",
|
|
141
|
+
label: "Request Form",
|
|
142
|
+
description: "Send a form to a human to collect structured data via Hiloop.",
|
|
143
|
+
parameters: FormSchema,
|
|
144
|
+
async execute(_toolCallId, params) {
|
|
145
|
+
try {
|
|
146
|
+
const ix = await client.createInteraction({
|
|
147
|
+
type: "form",
|
|
148
|
+
encryptedTitle: String(params.title),
|
|
149
|
+
encryptedFormSchema: String(params.formSchema),
|
|
150
|
+
priority: (params.priority || cfg.defaultPriority),
|
|
151
|
+
deadlineMinutes: typeof params.deadlineMinutes === "number" ? params.deadlineMinutes : undefined,
|
|
152
|
+
});
|
|
153
|
+
return json({ interactionId: ix.id, status: ix.status });
|
|
154
|
+
}
|
|
155
|
+
catch (err) {
|
|
156
|
+
return json({ error: err instanceof Error ? err.message : String(err) });
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
api.registerTool({
|
|
161
|
+
name: "hiloop_send_notification",
|
|
162
|
+
label: "Send Notification",
|
|
163
|
+
description: "Send a fire-and-forget notification to a human via Hiloop.",
|
|
164
|
+
parameters: NotifySchema,
|
|
165
|
+
async execute(_toolCallId, params) {
|
|
166
|
+
try {
|
|
167
|
+
const ix = await client.createInteraction({
|
|
168
|
+
type: "notification",
|
|
169
|
+
encryptedTitle: String(params.title),
|
|
170
|
+
encryptedDescription: typeof params.description === "string" ? params.description : undefined,
|
|
171
|
+
priority: (params.priority || cfg.defaultPriority),
|
|
172
|
+
});
|
|
173
|
+
return json({ interactionId: ix.id, status: ix.status });
|
|
174
|
+
}
|
|
175
|
+
catch (err) {
|
|
176
|
+
return json({ error: err instanceof Error ? err.message : String(err) });
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
api.registerTool({
|
|
181
|
+
name: "hiloop_check_status",
|
|
182
|
+
label: "Check Status",
|
|
183
|
+
description: "Check the current status of a Hiloop interaction.",
|
|
184
|
+
parameters: InteractionIdSchema,
|
|
185
|
+
async execute(_toolCallId, params) {
|
|
186
|
+
try {
|
|
187
|
+
const ix = await client.getInteraction(String(params.interactionId));
|
|
188
|
+
return json({
|
|
189
|
+
id: ix.id,
|
|
190
|
+
type: ix.type,
|
|
191
|
+
status: ix.status,
|
|
192
|
+
priority: ix.priority,
|
|
193
|
+
respondedBy: ix.respondedBy,
|
|
194
|
+
encryptedResponse: ix.encryptedResponse,
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
catch (err) {
|
|
198
|
+
return json({ error: err instanceof Error ? err.message : String(err) });
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
});
|
|
202
|
+
api.registerTool({
|
|
203
|
+
name: "hiloop_await_response",
|
|
204
|
+
label: "Await Response",
|
|
205
|
+
description: "Wait for a human to respond to a Hiloop interaction (up to 30s).",
|
|
206
|
+
parameters: AwaitSchema,
|
|
207
|
+
async execute(_toolCallId, params) {
|
|
208
|
+
try {
|
|
209
|
+
const timeout = typeof params.timeout === "number" ? params.timeout : 30;
|
|
210
|
+
const ix = await client.awaitResponse(String(params.interactionId), timeout);
|
|
211
|
+
return json({
|
|
212
|
+
id: ix.id,
|
|
213
|
+
status: ix.status,
|
|
214
|
+
encryptedResponse: ix.encryptedResponse,
|
|
215
|
+
respondedBy: ix.respondedBy,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
catch (err) {
|
|
219
|
+
return json({ error: err instanceof Error ? err.message : String(err) });
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
api.registerTool({
|
|
224
|
+
name: "hiloop_cancel_request",
|
|
225
|
+
label: "Cancel Request",
|
|
226
|
+
description: "Cancel a pending Hiloop interaction.",
|
|
227
|
+
parameters: InteractionIdSchema,
|
|
228
|
+
async execute(_toolCallId, params) {
|
|
229
|
+
try {
|
|
230
|
+
const ix = await client.cancelInteraction(String(params.interactionId));
|
|
231
|
+
return json({ id: ix.id, status: ix.status });
|
|
232
|
+
}
|
|
233
|
+
catch (err) {
|
|
234
|
+
return json({ error: err instanceof Error ? err.message : String(err) });
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
});
|
|
238
|
+
api.registerTool({
|
|
239
|
+
name: "hiloop_check_quota",
|
|
240
|
+
label: "Check Quota",
|
|
241
|
+
description: "Check your Hiloop usage quota.",
|
|
242
|
+
parameters: Type.Object({}),
|
|
243
|
+
async execute() {
|
|
244
|
+
try {
|
|
245
|
+
return json(await client.checkQuota());
|
|
246
|
+
}
|
|
247
|
+
catch (err) {
|
|
248
|
+
return json({ error: err instanceof Error ? err.message : String(err) });
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
});
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
export default plugin;
|
|
35
255
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,kBAAkB,GAAG;IACzB,KAAK,CAAC,KAAc;QAClB,OAAO,mBAAmB,CAAC,KAAK,CAC9B,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAChD,CAAC;IACJ,CAAC;IACD,OAAO,EAAE;QACP,MAAM,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,8CAA8C;YACpD,SAAS,EAAE,IAAI;SAChB;QACD,OAAO,EAAE;YACP,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,mDAAmD;SAC1D;QACD,cAAc,EAAE;YACd,KAAK,EAAE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O,IAAI,CAAC,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBAC3E,CAAC;YACH,CAAC;SACF,CAAC,CAAC;QAEH,GAAG,CAAC,YAAY,CAAC;YACf,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,gCAAgC;YAC7C,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,KAAK,CAAC,OAAO;gBACX,IAAI,CAAC;oBACH,OAAO,IAAI,CAAC,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;gBACzC,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBAC3E,CAAC;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hiloop-openclaw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Hiloop channel plugin for OpenClaw - human-in-the-loop for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
|
-
"src/skill.md"
|
|
10
|
+
"src/skill.md",
|
|
11
|
+
"openclaw.plugin.json"
|
|
11
12
|
],
|
|
12
13
|
"scripts": {
|
|
13
14
|
"build": "tsc",
|
|
@@ -15,14 +16,18 @@
|
|
|
15
16
|
"dev": "tsc --watch"
|
|
16
17
|
},
|
|
17
18
|
"openclaw": {
|
|
18
|
-
"extensions": [
|
|
19
|
+
"extensions": [
|
|
20
|
+
"./dist/index.js"
|
|
21
|
+
],
|
|
19
22
|
"channel": {
|
|
20
23
|
"id": "hiloop",
|
|
21
24
|
"label": "Hiloop",
|
|
22
25
|
"docsPath": "/channels/hiloop",
|
|
23
26
|
"blurb": "Human-in-the-loop: approvals, chat, reviews, forms, live sessions, voice.",
|
|
24
27
|
"order": 80,
|
|
25
|
-
"aliases": [
|
|
28
|
+
"aliases": [
|
|
29
|
+
"hi-loop"
|
|
30
|
+
]
|
|
26
31
|
},
|
|
27
32
|
"install": {
|
|
28
33
|
"npmSpec": "hiloop-openclaw@^0.2.0"
|
|
@@ -50,10 +55,15 @@
|
|
|
50
55
|
"node": ">=18"
|
|
51
56
|
},
|
|
52
57
|
"dependencies": {
|
|
58
|
+
"@sinclair/typebox": "^0.34.48",
|
|
53
59
|
"zod": "^3.24"
|
|
54
60
|
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"openclaw": ">=2026.2.0"
|
|
63
|
+
},
|
|
55
64
|
"devDependencies": {
|
|
56
65
|
"@types/node": "^22",
|
|
66
|
+
"openclaw": "^2026.2.19",
|
|
57
67
|
"typescript": "^5.7"
|
|
58
68
|
}
|
|
59
69
|
}
|