@alfe.ai/openclaw 0.0.28 → 0.0.30
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 +24 -0
- package/dist/plugin.d.cts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin2.cjs +2 -3
- package/dist/plugin2.js +2 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -44,6 +44,30 @@ Alfe Cloud ←—— WebSocket ——→ alfe-gateway daemon (always-on)
|
|
|
44
44
|
The plugin is a thin IPC client. All heavy lifting (cloud connection, auth,
|
|
45
45
|
protocol translation) is handled by the daemon.
|
|
46
46
|
|
|
47
|
+
## Plugin Registration Modes
|
|
48
|
+
|
|
49
|
+
OpenClaw calls `activate(api)` in different modes. Plugins that start persistent
|
|
50
|
+
resources (IPC connections, WebSockets, timers) **must** guard against CLI metadata
|
|
51
|
+
mode to avoid zombie connections during commands like `openclaw plugins list`:
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
// OpenClaw always provides api.runtime (even as empty {} in CLI mode),
|
|
55
|
+
// so checking api.runtime truthiness does NOT work.
|
|
56
|
+
if (api.registrationMode === 'cli-metadata') {
|
|
57
|
+
log.debug('CLI metadata mode — skipping resource init');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Register tools **before** this guard so they're available for CLI introspection.
|
|
63
|
+
|
|
64
|
+
| Mode | Context | Persistent resources? |
|
|
65
|
+
|---|---|---|
|
|
66
|
+
| `"full"` | Gateway run, plugin enabled | Yes |
|
|
67
|
+
| `"setup-runtime"` | Gateway run, channel setup | Yes |
|
|
68
|
+
| `"setup-only"` | Gateway run, setup-only channels | Yes |
|
|
69
|
+
| `"cli-metadata"` | CLI commands | **No** |
|
|
70
|
+
|
|
47
71
|
## Note
|
|
48
72
|
|
|
49
73
|
Integration management (install, remove, configure, health) is handled by
|
package/dist/plugin.d.cts
CHANGED
package/dist/plugin.d.ts
CHANGED
package/dist/plugin2.cjs
CHANGED
|
@@ -3180,7 +3180,6 @@ const plugin = {
|
|
|
3180
3180
|
version: "0.1.0",
|
|
3181
3181
|
activate(api) {
|
|
3182
3182
|
const log = api.logger;
|
|
3183
|
-
const isGatewayMode = !!api.runtime;
|
|
3184
3183
|
let cfg = null;
|
|
3185
3184
|
try {
|
|
3186
3185
|
cfg = (0, _alfe_ai_config.resolveConfig)();
|
|
@@ -3195,8 +3194,8 @@ const plugin = {
|
|
|
3195
3194
|
for (const tool of tools) api.registerTool(tool);
|
|
3196
3195
|
log.info(`Registered ${String(tools.length)} integration tools: ${tools.map((t) => t.name).join(", ")}`);
|
|
3197
3196
|
}
|
|
3198
|
-
if (
|
|
3199
|
-
log.debug("
|
|
3197
|
+
if (api.registrationMode === "cli-metadata") {
|
|
3198
|
+
log.debug("CLI metadata mode — skipping IPC connection init");
|
|
3200
3199
|
return;
|
|
3201
3200
|
}
|
|
3202
3201
|
if (globalThis.__alfeOpenclawPluginActivated === true) {
|
package/dist/plugin2.js
CHANGED
|
@@ -3182,7 +3182,6 @@ const plugin = {
|
|
|
3182
3182
|
version: "0.1.0",
|
|
3183
3183
|
activate(api) {
|
|
3184
3184
|
const log = api.logger;
|
|
3185
|
-
const isGatewayMode = !!api.runtime;
|
|
3186
3185
|
let cfg = null;
|
|
3187
3186
|
try {
|
|
3188
3187
|
cfg = resolveConfig();
|
|
@@ -3197,8 +3196,8 @@ const plugin = {
|
|
|
3197
3196
|
for (const tool of tools) api.registerTool(tool);
|
|
3198
3197
|
log.info(`Registered ${String(tools.length)} integration tools: ${tools.map((t) => t.name).join(", ")}`);
|
|
3199
3198
|
}
|
|
3200
|
-
if (
|
|
3201
|
-
log.debug("
|
|
3199
|
+
if (api.registrationMode === "cli-metadata") {
|
|
3200
|
+
log.debug("CLI metadata mode — skipping IPC connection init");
|
|
3202
3201
|
return;
|
|
3203
3202
|
}
|
|
3204
3203
|
if (globalThis.__alfeOpenclawPluginActivated === true) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/openclaw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.30",
|
|
4
4
|
"description": "OpenClaw plugin for Alfe — connects to local gateway daemon via IPC for integration management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@auriclabs/logger": "^0.1.1",
|
|
27
27
|
"@sinclair/typebox": "^0.34.48",
|
|
28
|
-
"@alfe.ai/agent-api-client": "^0.0.
|
|
28
|
+
"@alfe.ai/agent-api-client": "^0.0.8",
|
|
29
29
|
"@alfe.ai/config": "^0.0.8"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|