@hyperspell/openclaw-hyperspell 0.1.0 → 0.1.1
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/README.md +13 -5
- package/commands/slash.ts +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# OpenClaw Hyperspell Plugin
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+
|
|
3
5
|
OpenClaw plugin for [Hyperspell](https://hyperspell.com) - Context and memory for your AI agents.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
@@ -15,12 +17,18 @@ Add to your `openclaw.json`:
|
|
|
15
17
|
```json
|
|
16
18
|
{
|
|
17
19
|
"plugins": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
20
|
+
"entries": {
|
|
21
|
+
"openclaw-hyperspell": {
|
|
22
|
+
"enabled": true,
|
|
23
|
+
"config": {
|
|
24
|
+
"apiKey": "${HYPERSPELL_API_KEY}",
|
|
25
|
+
"autoContext": true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
21
28
|
}
|
|
22
29
|
}
|
|
23
30
|
}
|
|
31
|
+
|
|
24
32
|
```
|
|
25
33
|
|
|
26
34
|
Or set the environment variable:
|
|
@@ -42,12 +50,12 @@ export HYPERSPELL_API_KEY=hs_...
|
|
|
42
50
|
|
|
43
51
|
## Slash Commands
|
|
44
52
|
|
|
45
|
-
### `/
|
|
53
|
+
### `/getcontext <query>`
|
|
46
54
|
|
|
47
55
|
Search your memories for relevant context.
|
|
48
56
|
|
|
49
57
|
```
|
|
50
|
-
/
|
|
58
|
+
/getcontext Q1 budget planning
|
|
51
59
|
```
|
|
52
60
|
|
|
53
61
|
### `/connect <source>`
|
package/commands/slash.ts
CHANGED
|
@@ -19,19 +19,19 @@ export function registerCommands(
|
|
|
19
19
|
client: HyperspellClient,
|
|
20
20
|
_cfg: HyperspellConfig,
|
|
21
21
|
): void {
|
|
22
|
-
// /
|
|
22
|
+
// /getcontext <query> - Search memories and show summaries
|
|
23
23
|
api.registerCommand({
|
|
24
|
-
name: "
|
|
24
|
+
name: "getcontext",
|
|
25
25
|
description: "Search your memories for relevant context",
|
|
26
26
|
acceptsArgs: true,
|
|
27
27
|
requireAuth: true,
|
|
28
28
|
handler: async (ctx: { args?: string }) => {
|
|
29
29
|
const query = ctx.args?.trim()
|
|
30
30
|
if (!query) {
|
|
31
|
-
return { text: "Usage: /
|
|
31
|
+
return { text: "Usage: /getcontext <search query>" }
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
log.debug(`/
|
|
34
|
+
log.debug(`/getcontext command: "${query}"`)
|
|
35
35
|
|
|
36
36
|
try {
|
|
37
37
|
const results = await client.search(query, { limit: 5 })
|
|
@@ -50,7 +50,7 @@ export function registerCommands(
|
|
|
50
50
|
text: `Found ${results.length} memories:\n\n${lines.join("\n")}`,
|
|
51
51
|
}
|
|
52
52
|
} catch (err) {
|
|
53
|
-
log.error("/
|
|
53
|
+
log.error("/getcontext failed", err)
|
|
54
54
|
return { text: "Failed to search memories. Check logs for details." }
|
|
55
55
|
}
|
|
56
56
|
},
|