opengate 0.2.4 → 0.2.8

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 CHANGED
@@ -1,5 +1,12 @@
1
+ import * as openclaw_plugin_sdk from 'openclaw/plugin-sdk';
1
2
  import { OpenClawPluginApi } from 'openclaw/plugin-sdk';
2
3
 
3
- declare function register(api: OpenClawPluginApi): void;
4
+ declare const _default: {
5
+ id: string;
6
+ name: string;
7
+ description: string;
8
+ configSchema: openclaw_plugin_sdk.OpenClawPluginConfigSchema;
9
+ register(api: OpenClawPluginApi): void;
10
+ };
4
11
 
5
- export { register as default };
12
+ export { _default as default };
package/dist/index.js CHANGED
@@ -1,3 +1,6 @@
1
+ // src/index.ts
2
+ import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
3
+
1
4
  // src/config.ts
2
5
  function resolveConfig(raw) {
3
6
  const url = typeof raw.url === "string" ? raw.url.replace(/\/$/, "") : "";
@@ -367,34 +370,40 @@ var OpenGatePoller = class {
367
370
  };
368
371
 
369
372
  // src/index.ts
370
- function register(api) {
371
- let poller = null;
372
- let pluginCfg;
373
- try {
374
- pluginCfg = resolveConfig(api.pluginConfig ?? {});
375
- } catch (e) {
376
- api.logger.error(e instanceof Error ? e.message : String(e));
377
- return;
378
- }
379
- const hooksToken = api.config?.hooks?.token;
380
- if (!hooksToken) {
381
- api.logger.error(
382
- '[opengate] hooks.token is not configured. Add the following to your OpenClaw config to enable task spawning:\n "hooks": { "enabled": true, "token": "<your-secret>", "allowRequestSessionKey": true, "allowedSessionKeyPrefixes": ["opengate-task:"] }'
383
- );
384
- return;
385
- }
386
- api.registerService({
387
- id: "opengate-poller",
388
- start(ctx) {
389
- poller = new OpenGatePoller(pluginCfg, api.config, ctx.logger, ctx.stateDir);
390
- poller.start();
391
- },
392
- stop(ctx) {
393
- poller?.stop();
394
- poller = null;
373
+ var index_default = {
374
+ id: "opengate",
375
+ name: "OpenGate",
376
+ description: "Polls OpenGate for assigned tasks and spawns isolated OpenClaw sessions to execute them. Turns OpenGate into the orchestrator.",
377
+ configSchema: emptyPluginConfigSchema(),
378
+ register(api) {
379
+ let poller = null;
380
+ let pluginCfg;
381
+ try {
382
+ pluginCfg = resolveConfig(api.pluginConfig ?? {});
383
+ } catch (e) {
384
+ api.logger.error(e instanceof Error ? e.message : String(e));
385
+ return;
395
386
  }
396
- });
397
- }
387
+ const hooksToken = api.config?.hooks?.token;
388
+ if (!hooksToken) {
389
+ api.logger.error(
390
+ '[opengate] hooks.token is not configured. Add the following to your OpenClaw config to enable task spawning:\n "hooks": { "enabled": true, "token": "<your-secret>", "allowRequestSessionKey": true, "allowedSessionKeyPrefixes": ["opengate-task:"] }'
391
+ );
392
+ return;
393
+ }
394
+ api.registerService({
395
+ id: "opengate-poller",
396
+ start(ctx) {
397
+ poller = new OpenGatePoller(pluginCfg, api.config, ctx.logger, ctx.stateDir);
398
+ poller.start();
399
+ },
400
+ stop(ctx) {
401
+ poller?.stop();
402
+ poller = null;
403
+ }
404
+ });
405
+ }
406
+ };
398
407
  export {
399
- register as default
408
+ index_default as default
400
409
  };
@@ -2,12 +2,11 @@
2
2
  "id": "opengate",
3
3
  "name": "OpenGate",
4
4
  "description": "Polls OpenGate for assigned tasks and spawns isolated OpenClaw sessions to execute them. Turns OpenGate into the orchestrator.",
5
- "version": "0.2.4",
5
+ "version": "0.2.8",
6
6
  "skills": ["./skills/opengate"],
7
7
  "configSchema": {
8
8
  "type": "object",
9
9
  "additionalProperties": false,
10
- "required": ["url", "apiKey"],
11
10
  "properties": {
12
11
  "url": {
13
12
  "type": "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opengate",
3
- "version": "0.2.4",
3
+ "version": "0.2.8",
4
4
  "description": "OpenGate task executor plugin for OpenClaw — polls assigned tasks and spawns isolated agent sessions",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -26,7 +26,11 @@
26
26
  "openclaw": {
27
27
  "extensions": [
28
28
  "./dist/index.js"
29
- ]
29
+ ],
30
+ "install": {
31
+ "npmSpec": "opengate",
32
+ "defaultChoice": "npm"
33
+ }
30
34
  },
31
35
  "publishConfig": {
32
36
  "access": "public"