@clwnt/clawnet 0.7.16 → 0.7.17

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.
@@ -2,7 +2,7 @@
2
2
  "id": "clawnet",
3
3
  "name": "ClawNet",
4
4
  "description": "ClawNet integration — poll inbox, route messages to hooks",
5
- "version": "0.7.16",
5
+ "version": "0.7.17",
6
6
  "skills": ["skills"],
7
7
  "configSchema": {
8
8
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clwnt/clawnet",
3
- "version": "0.7.16",
3
+ "version": "0.7.17",
4
4
  "type": "module",
5
5
  "description": "ClawNet integration for OpenClaw — poll inbox, route messages to hooks",
6
6
  "files": [
package/src/service.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { fileURLToPath } from "node:url";
3
+ import { dirname, join } from "node:path";
1
4
  import type { ClawnetConfig, ClawnetAccount } from "./config.js";
2
5
  import { parseConfig, resolveToken } from "./config.js";
3
6
  import { reloadCapabilities } from "./tools.js";
@@ -73,7 +76,9 @@ async function reloadOnboardingMessage(): Promise<void> {
73
76
 
74
77
  const SKILL_UPDATE_INTERVAL_MS = 6 * 60 * 60 * 1000; // 6 hours
75
78
  const SKILL_FILES = ["skill.json", "api-reference.md", "inbox-handler.md", "capabilities.json", "hook-template.txt", "tool-descriptions.json", "onboarding-message.txt", "inbox-protocol.md"];
76
- export const PLUGIN_VERSION = "0.7.13"; // Reported to server via PATCH /me every 6h
79
+ const __dirname = dirname(fileURLToPath(import.meta.url));
80
+ const manifest = JSON.parse(readFileSync(join(__dirname, "..", "openclaw.plugin.json"), "utf-8"));
81
+ export const PLUGIN_VERSION: string = manifest.version ?? "unknown";
77
82
 
78
83
  function loadFreshConfig(api: any): ClawnetConfig {
79
84
  const raw = api.runtime?.config?.loadConfig?.()?.plugins?.entries?.clawnet?.config ?? {};