@kanvas/openclaw-plugin 0.1.10 → 0.1.11
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 +15 -0
- package/dist/index.js +22 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -230,6 +230,21 @@ KANVAS_PASSWORD=yourpassword \
|
|
|
230
230
|
npx ts-node --esm scripts/smoke-test.ts
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
+
## Releasing
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
npm version patch # bumps 0.1.x → 0.1.x+1 and creates a git commit + tag
|
|
237
|
+
git push && git push --tags
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
GitHub Actions builds and publishes to npm automatically on any `v*` tag.
|
|
241
|
+
|
|
242
|
+
Then on the agent machine:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
openclaw plugins update kanvas
|
|
246
|
+
```
|
|
247
|
+
|
|
233
248
|
## License
|
|
234
249
|
|
|
235
250
|
MIT
|
package/dist/index.js
CHANGED
|
@@ -67,7 +67,28 @@ export default {
|
|
|
67
67
|
description: "Connects agents to Kanvas — your company's nervous system for CRM, inventory, orders, and messaging.",
|
|
68
68
|
configSchema: { type: "object" },
|
|
69
69
|
register(api) {
|
|
70
|
-
|
|
70
|
+
// Guard: resolve config and log a warning instead of throwing if
|
|
71
|
+
// credentials are missing. This prevents the gateway from entering
|
|
72
|
+
// an infinite retry loop when the plugin is installed but not yet
|
|
73
|
+
// configured, or when the gateway re-invokes register() multiple times.
|
|
74
|
+
let config;
|
|
75
|
+
try {
|
|
76
|
+
config = resolveConfig(api.pluginConfig);
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
api.logger.info(`Kanvas plugin skipped: ${err.message}. Run "openclaw kanvas setup" to configure.`);
|
|
80
|
+
// Still register the CLI so the user can run setup even without config
|
|
81
|
+
api.registerCli((ctx) => {
|
|
82
|
+
ctx.program
|
|
83
|
+
.command("setup")
|
|
84
|
+
.description("Interactive setup — configure Kanvas credentials and test the connection")
|
|
85
|
+
.action(async () => {
|
|
86
|
+
const { runSetup } = await import("./cli/setup.js");
|
|
87
|
+
await runSetup();
|
|
88
|
+
});
|
|
89
|
+
}, { commands: ["setup"] });
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
71
92
|
const client = new KanvasClient(config);
|
|
72
93
|
const ensureAuth = createAuthGuard(client, config, api.logger);
|
|
73
94
|
const crm = new CrmService(client);
|
package/package.json
CHANGED