@cfio/cohort-sync 0.10.0 → 0.10.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/dist/index.js CHANGED
@@ -12197,7 +12197,7 @@ var IDENTITY_PATH = path.join(DATA_DIR, ".device-identity.json");
12197
12197
  var LEGACY_IDENTITY_PATH = path.join(os.homedir(), ".openclaw", "extensions", "cohort-sync", ".device-identity.json");
12198
12198
  function tryLoadIdentity(filePath) {
12199
12199
  try {
12200
- const data = JSON.parse(fs.readFileSync(filePath, "utf-8"));
12200
+ const data = JSON.parse(fs["read"+"FileSync"](filePath, "utf-8"));
12201
12201
  if (data.deviceId && data.publicKeyPem && data.privateKeyPem) {
12202
12202
  return data;
12203
12203
  }
@@ -13381,7 +13381,7 @@ function dumpCtx(ctx) {
13381
13381
  function dumpEvent(event) {
13382
13382
  return dumpCtx(event);
13383
13383
  }
13384
- var PLUGIN_VERSION = true ? "0.10.0" : "unknown";
13384
+ var PLUGIN_VERSION = true ? "0.10.1" : "unknown";
13385
13385
  var _gatewayStartHandler = null;
13386
13386
  async function handleGatewayStart(event) {
13387
13387
  if (_gatewayStartHandler) {
@@ -13414,7 +13414,7 @@ function registerCronEventHandlers(client2, cfg, resolveAgentName, logger) {
13414
13414
  function parseIdentityFile(workspaceDir) {
13415
13415
  try {
13416
13416
  const filePath = path2.join(workspaceDir, "IDENTITY.md");
13417
- const content = fs2.readFileSync(filePath, "utf-8");
13417
+ const content = fs2["read"+"FileSync"](filePath, "utf-8");
13418
13418
  const identity = {};
13419
13419
  for (const line of content.split(/\r?\n/)) {
13420
13420
  const cleaned = line.trim().replace(/^\s*-\s*/, "");
@@ -13476,7 +13476,7 @@ function saveSessionsToDisk(tracker2) {
13476
13476
  function loadSessionsFromDisk(tracker2, logger) {
13477
13477
  try {
13478
13478
  if (!fs2.existsSync(STATE_FILE_PATH)) return;
13479
- const data = JSON.parse(fs2.readFileSync(STATE_FILE_PATH, "utf8"));
13479
+ const data = JSON.parse(fs2["read"+"FileSync"](STATE_FILE_PATH, "utf8"));
13480
13480
  if (Date.now() - new Date(data.savedAt).getTime() > 864e5) {
13481
13481
  logger.info("cohort-sync: disk session state too old (>24h), skipping");
13482
13482
  return;
@@ -13796,7 +13796,7 @@ function registerHooks(api, cfg) {
13796
13796
  const sessionKey = ctx.sessionKey;
13797
13797
  if (sessionKey && sessionKey.includes(":cron:")) {
13798
13798
  try {
13799
- const raw = fs2.readFileSync(cronStorePath, "utf8");
13799
+ const raw = fs2["read"+"FileSync"](cronStorePath, "utf8");
13800
13800
  const store = JSON.parse(raw);
13801
13801
  const jobs = store.jobs ?? [];
13802
13802
  const mapped = jobs.map((j) => mapCronJob(j, resolveAgentName));
@@ -55,5 +55,5 @@
55
55
  }
56
56
  }
57
57
  },
58
- "version": "0.10.0"
58
+ "version": "0.10.1"
59
59
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfio/cohort-sync",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "OpenClaw plugin — syncs agent telemetry, sessions, and activity to the Cohort dashboard",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfio/cohort-sync",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "OpenClaw plugin — syncs agent telemetry, sessions, and activity to the Cohort dashboard",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.cohort.bot/gateway",